18.07.2014, 20:17
Not sure what I am doing wrong.
Here's the code;
Error:
Line 412:
Basically, it should check in the user ini file, if the status is 2 then it kicks them.
Here's the code;
pawn Код:
if(fexist(UserPath(playerid)))
{
new INI:File = INI_Open(UserPath(playerid));
if(INI_Int(File,"Status" == 2)
{
new string[128];
format(string, sizeof(string), ""red"Your account has been banned!"white"\n\nBanned by:\t %s\nReason:\t %s\nBan Date:\t %s", INI_String(file, "BannedBy"), INI_String(file, "BanReason"), INI_String(file, "BanDate"));
ShowPlayerDialog(playerid, BAN_DIALOG, DIALOG_STYLE_MSGBOX, " ", string, "OK", "");
KickEx(playerid);
INI_Close(ini);
return 0;
}
else
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","Type your password below to login.","Login","Quit");
SendClientMessage(playerid,X11_SLATEGREY, "Welcome to Valhalla's TDM Server. We hope you enjoy your stay.");
return 1;
}
return 1;
}
Quote:
412) : error 029: invalid expression, assumed zero (412) : error 035: argument type mismatch (argument 1) (412) : error 001: expected token: ";", but found "return" (412) : fatal error 107: too many error messages on one line |
pawn Код:
if(INI_Int(File,"Status" == 2)