15.12.2010, 15:54
Код:
#define MAX_SLOTS 10 new Stunned[MAX_SLOTS]; new PlayerSuspect[MAX_SLOTS]; if(strcmp(cmd, "/jail", true) == 0) { new cmd[128], idx; cmd = strtok(cmdtext, idx); new giveplayerid; if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /jail [playerid]"); return 1; } giveplayerid = strval(tmp); tmp = strtok(cmdtext, idx); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); if(gTeam[playerid] == TEAM_COP) { if(PlayerToPoint(5, giveplayerid, x , y, z)) { if(gTeam[giveplayerid] != TEAM_COP) { if(Stunned[giveplayerid] == 1) { if(PlayerSuspect[giveplayerid] == 1) { PlayerInfo[giveplayerid][pJailedSec] = PLAYER_JAILED_SECONDS; OnPlayerJailed(giveplayerid); format(string, sizeof(string), "Officer %s has jailed (suspect) %s, For %d seconds (reward: $%d,-)", sendername, giveplayer, PLAYER_JAILED_SECONDS, JAIL_MONEY); SendClientMessageToAll(COLOR_BLUE, string); GivePlayerMoney(playerid, JAIL_MONEY); return 1; } else { SendClientMessage(playerid, COLOR_RED, "That player is not a suspect."); } } else { SendClientMessage(playerid, COLOR_RED, "You must first /stun a suspect before you can jail him."); } } else { SendClientMessage(playerid, COLOR_RED, "You could not jail an officer that follows the law to."); } } else { SendClientMessage(playerid, COLOR_RED, "That playerid is not close (enough) to you!"); } return 1; } else { SendClientMessage(playerid, COLOR_GREY, "You are not a cop."); } return 1; } C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(64) : error 017: undefined symbol "cmd" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(67) : warning 217: loose indentation C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(67) : error 017: undefined symbol "strtok" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(67) : error 033: array must be indexed (variable "cmd") C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(71) : warning 217: loose indentation C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(71) : error 017: undefined symbol "tmp" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(73) : error 017: undefined symbol "COLOR_GREY" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(76) : error 017: undefined symbol "tmp" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(77) : error 017: undefined symbol "tmp" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(77) : error 017: undefined symbol "strtok" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(78) : error 017: undefined symbol "giveplayer" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(78) : error 017: undefined symbol "giveplayer" C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(78) : error 029: invalid expression, assumed zero C:\Users\Robin\Desktop\SA-MP 0.3C\filterscripts\copcmds.pwn(78) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 12 Errors.