Код:
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(23756) : error 029: invalid expression, assumed zero
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(23760) : error 029: invalid expression, assumed zero
C:\Users\Nicklas\Desktop\PRP\gamemodes\PRP.pwn(23764) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Код:
if(strcmp(cmd, "/setlicplate", true) == 0)
{
new id;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setlicplate [playerid] [1-3] [text]");
return 1;
}
id = strvalEx(tmp);
new vehslot;
tmp = strtok(cmdtext, idx);
vehslot = strvalEx(tmp);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[96];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setlicplate [playerid] [1-3] [text]");
return 1;
}
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
if(PlayerInfo[id][pAdmin] >= 1)
{
format(string, sizeof(string), "Admin %s has changed %s's [%d] vehicle licplate to %s.", PlayerInfo[playerid][pAdminName], GetName(id), (vehslot), (result));
ABroadCast(COLOR_LIGHTRED, string, 0);
if((vehslot) == 1)
{
format(PlayerInfo[id][CarLic], 32, "%s", (result));
}
else if((vehslot) == 2)
{
format(PlayerInfo[id][CarLic2], 32, "%s", (result));
}
else if((vehslot) == 3)
{
format(PlayerInfo[id][CarLic3], 32, "%s", (result));
}
OnPlayerSave(id);
}
}
}
return 1;
}