22.12.2011, 14:27
Can Someone fix this please?
I get these errors
I get these errors
pawn Код:
TestLogin.pwn(155) : warning 211: possibly unintended assignment
TestLogin.pwn(155) : error 022: must be lvalue (non-constant)
TestLogin.pwn(155) : error 029: invalid expression, assumed zero
TestLogin.pwn(155) : warning 215: expression has no effect
TestLogin.pwn(155) : error 029: invalid expression, assumed zero
TestLogin.pwn(155) : fatal error 107: too many error messages on one line
pawn Код:
dcmd_makeadmin(playerid, params[])
{
if (strlen(params))
{
if(pAdmin =< 2)
{
new
pID,
level;
if (!sscanf(params, "ii", pID, level)
{
if (pID != INVALID_PLAYER_ID)
{
new msg;
INI_WriteInt(File,"Admin",level);
SendClientMessage(playerid, COLOR_WHITE, "You have been promoted");
}
else SendClientMessage(playerid, COLOR_WHITE, "Player not connected");
}
else SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /makeadmin <playerid> <level>");
}
else SendClientMessage(playerid, COLOR_WHITE, "You need to be at least level 2 for this command")
}
return 1;
}