22.12.2013, 06:20
i get this ,when im trying to make a command for army stats....
here is the command .....
pawn Код:
C:\Users\Hacker\Desktop\my script\gamemodes\test.pwn(1359) : error 012: invalid function call, not a valid address
C:\Users\Hacker\Desktop\my script\gamemodes\test.pwn(1359) : warning 215: expression has no effect
C:\Users\Hacker\Desktop\my script\gamemodes\test.pwn(1359) : error 001: expected token: ";", but found ")"
C:\Users\Hacker\Desktop\my script\gamemodes\test.pwn(1359) : error 029: invalid expression, assumed zero
C:\Users\Hacker\Desktop\my script\gamemodes\test.pwn(1359) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
cmd(army, playerid, params[])
{
if(pInfo[playerid][Adminlevel] >= 5)
{
new string[200], pName[MAX_PLAYER_NAME];
if(sscanf(params, "u", playerid))
return SendClientMessage(playerid, COLOR_RED, "Usage: /army (player <id>)");
if(!IsPlayerConnected(playerid))
return SendClientMessage(playerid, COLOR_RED, "Usage: /army (player <id>)");
if(GetPVarInt(playerid, "ArmyPermission") == 1337)
return SendClientMessage(playerid, COLOR_RED, "That player already have army stats!! .");
format(string, 120, "[ARMY NEWS] Server Admin %s has made %s a member of the Army!", pInfo(playerid), pInfo([playerid))
SendClientMessageToAll(COLOR_PURPLE, string);
SendAdminMessage(string);
CNR_PrintString(string);
SendClientMessage(playerid, COLOR_PURPLE, "You are now able to play as Los Santos Army. Be sure to stick with rules or your army stats will be taken.");
SetPVarInt(playerid, "ArmyPermission", 1337);
}
return 1;
}