Loose indentation? how can i fix it?
1 Attachment(s)
I'm new member of alliedmods and the only 1 reason i came here because i want to ask you guys that how can i fix a problem called: loose indentation in sourcemod scripting when i compile my script that error shows everytime... here's my script down below...
|
Re: Loose indentation? how can i fix it?
It's because you mix spaces with tabs.
Spoiler
|
Re: Loose indentation? how can i fix it?
Quote:
|
Re: Loose indentation? how can i fix it?
1 Attachment(s)
I used the TextFX plugin for Notepad++ to reindent the attached file.
|
Re: Loose indentation? how can i fix it?
Maxpayn, if you paid attention you'd realize i put the fixed script along with my post...
Hint: "it's in the spoiler" |
Re: Loose indentation? how can i fix it?
max, you expirience problems with compilation not because of indentation warnings,
but because error in prototype of menu handler. In old syntax: Code:
public Action:AdminSoundsMenuHandler(Handle:menu, MenuAction:action, param1, param2)Code:
public AdminSoundsMenuHandler(Handle:menu, MenuAction:action, param1, param2)Code:
public int AdminSoundsMenuHandler(Handle:menu, MenuAction:action, param1, param2) |
Re: Loose indentation? how can i fix it?
#pragma tabsize 0 this code fixing this error
|
Re: Loose indentation? how can i fix it?
Quote:
|
Re: Loose indentation? how can i fix it?
Personally, I like this indentation warning feature. Saved me few times warn the place where I have really forgot a wrong code logic.
Just curious, are there any program languages where such feature exist too? |
Re: Loose indentation? how can i fix it?
Quote:
Code:
public int AdminSoundsMenuHandler(Menu menu, MenuAction action, int param1, int param2) |
| All times are GMT -4. The time now is 13:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.