25.10.2010, 11:55
Warning 217 - loose indentation:
Caused by bad indentation.
Example:
How to fix: Indent.
Indentation is tabs in script.
First code starts at column 0 (or 1) which is 0 tabs.
If a sub-part of a code (after a opening bracket { or if statement generally) you put a tab.
Example how to fix:
Caused by bad indentation.
Example:
pawn Код:
if( strcmp( cmdtext, "/test", true ))
{
MyFunctionHere;
if( something == somethingElse )
{ somethingMuchElse; }
return true;
}
Indentation is tabs in script.
First code starts at column 0 (or 1) which is 0 tabs.
If a sub-part of a code (after a opening bracket { or if statement generally) you put a tab.
Example how to fix:
pawn Код:
if( strcmp( cmdtext, "/test", true ))
{ //first part of code, no tabs
MyFunctionHere; //pawn uses 4 spaces for one tab. This is after a opening bracket, therefore we enter one tab.
if( something == somethingElse ) //here is another statement, but followed by a bracket, so the bracket won't be indented.
{
somethingMuchElse; //this, on the other hand, is after a bracket, therefore we indent with another tab.
} //the bracket is closed, therefore we go back to the column where the bracket is positioned (indented).
return true; //still the same column, since there are no more opening-brackets, and no statements.
} //closing this part of code - go back to the first column