What am I doing wrong?
#1

pawn Код:
forward UpdateBans(playerid);
public UpdateBans(playerid)
{
    if(strcmp(UserInfo[playerid][AccountLocked], "No", false) == 0)
    {
        if(LoggedIn[playerid] == 1) {
            new string[128];
            SendClientMessage(playerid, COLOR_ERROR, "This account is locked!");
            format(string, sizeof(string), "< Reason: %s", UserInfo[playerid][AccountLocked]);
            SendClientMessage(playerid, COLOR_ERROR, string);
            Kick(playerid);
        }
    }
    return 1;
}
The userfile reads as following:

Код:
AccountLocked = No
Therefore I know it's setting it correctly, but i'm assuming I did something wrong with the string compare. Can anyone tell me what I did incorrectly?
Reply


Messages In This Thread
What am I doing wrong? - by Scarred - 17.12.2011, 22:54
Re: What am I doing wrong? - by Scenario - 17.12.2011, 23:31
Re: What am I doing wrong? - by Scarred - 18.12.2011, 00:08
Re: What am I doing wrong? - by Scenario - 18.12.2011, 00:19
Re: What am I doing wrong? - by admantis - 18.12.2011, 00:31
Re: What am I doing wrong? - by Scarred - 18.12.2011, 01:26
Re: What am I doing wrong? - by Calgon - 18.12.2011, 02:38

Forum Jump:


Users browsing this thread: 2 Guest(s)