loose identation
#1

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
Reply
#2

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;
}
Reply
#3

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
Reply
#4

....
Reply
#5

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

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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)