How to fix this warning
#1

I get this warning in the gm i dunno how to fix it its

C:\Users\Desktop\Server1\gamemodes\testgm.pwn(5394 ) : warning 217: loose indentation

warning is a ( new file[256]; )
Reply
#2

Just indent properly. It keeps your code organized and easy to read, especially if you have a logic error. Or, if you don't feel like doing that, you can just add this to the top of your script.

pawn Код:
#pragma tabsize 0
Or you could just properly indent. :P
Reply
#3

Codes always help. I also highly agree with Backwardsman. It keeps your script organized.
Reply
#4

Actually, #pragma tabsize 0 can cause some problems, just indent the code. Examples:

Wrong indentation:
pawn Код:
CMD:abcd( playerid, params[ ] )
{
      ab = GetPlayerColor( playerid );
   SendClientMessage( playerid, ab, "This is your color" );
      SendClientMessage( playerid, ab, "Abcdefgh" );
return 1;
}
Good indentation:
pawn Код:
CMD:abcd( playerid, params[ ] )
{
    ab = GetPlayerColor( playerid );
    SendClientMessage( playerid, ab, "This is your color" );
    SendClientMessage( playerid, ab, "Abcdefgh" );
    return 1;
}
So practically, your spacing must be 4 spaces! Not something else!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)