SA-MP Forums Archive
loose identation - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: loose identation (/showthread.php?tid=175203)



loose identation - HardMode - 08.09.2010

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new n[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid,n,sizeof(n));
    format(file,sizeof(file),"MyAdmin/Users/%s.txt",n);
    PInfo[playerid][Logged] = 0;
             if(dini_Exists(file)) //error its here to the end
             {
                 dini_IntSet(file,"Logged",0);
                 return 1;
             }
    return 1;
}
Код HTML:
warning 217: loose indentation
hey i get this error compiling it. what im making wrong on this or if i lost something? any help are welcome

Im not geting errors with the rest of the code


Re: loose identation - [XST]O_x - 08.09.2010

It's not an error and it won't harm your script activity or anything..

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new n[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid,n,sizeof(n));
    format(file,sizeof(file),"MyAdmin/Users/%s.txt",n);
    PInfo[playerid][Logged] = 0;
    if(dini_Exists(file)) //error its here to the end
    {
        dini_IntSet(file,"Logged",0);
        return 1;
    }
    return 1;
}
pawn Код:
public Something(Another something)
{
    if(IsPlayerConnected(Another something))
    {
             //Somehting
            This will give loose indentation warning.
    }
    if(IsPlayerConnected(Another something))
    {
        //Something
        This won't
     }
     return something;
}



Re: loose identation - vital2k - 08.09.2010

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new n[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid,n,sizeof(n));
    format(file,sizeof(file),"MyAdmin/Users/%s.txt",n);
    PInfo[playerid][Logged] = 0;
    if(dini_Exists(file)) //error its here to the end
    {
        dini_IntSet(file,"Logged",0);
        return 1;
    }
    return 1;
}
^^ Was too late :P


Re: loose identation - Eirikm - 08.09.2010

....


Re: loose identation - Scarface~ - 08.09.2010

or you could
Код:
#pragma tabsize 0
at the top of your script and you wont get idention warnings.


Re: loose identation - _Vortex - 08.09.2010

Quote:
Originally Posted by Scarface~
Посмотреть сообщение
or you could
Код:
#pragma tabsize 0
at the top of your script and you wont get idention warnings.
Yeah but then it makes it harder for the server to read the files since it's improperly indented. It's not hard to correct indentation..