21.03.2009, 22:41
So ... I get this command from a job script:
NEW ERRORS:
AND FINALLY THE ERROR LINES :
COULD YOU HELP ME ?
Код:
//Variable: new jailed[MAX_PLAYERS]; //Code at OnPlayerCommandText if(strcmp(cmdtext, "/jail", true) == 0) {//UPDATED JAIL CMD ONlY JAILS IF THE SPECIFIED PERSON ISNT JAILED! tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREEN, "Use: /jail [Player ID]"); return 1; } giveplayerid = strval(tmp); if(jailed[giveplayerid]==0) { if (gTeam[playerid] == COPS) { if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "You have been jailed by officer %s!", sendername, playerid); SendClientMessage(giveplayerid, COLOR_RED1, string); format(string, sizeof(string), "%s has been jailed %s!", giveplayer, giveplayerid, sendername, playerid); SendClientMessageToAll(COLOR_RED1, string); printf(string); SetPlayerInterior(giveplayerid,3); jailed[giveplayerid] = 1; SetPlayerPos(giveplayerid,198.3797,160.8905,1003.0300); SetPlayerFacingAngle(giveplayerid,177.0350); SetCameraBehindPlayer(giveplayerid); PlayerPlaySound(giveplayerid,1082,198.3797,160.8905,1003.0300); TogglePlayerControllable(giveplayerid,0); //So the player that is jailed can't use /kill DisablePlayerCheckpoint(giveplayerid); return 1; }else{ format(string, sizeof(string), "ID %d is not connected.", giveplayerid); SendClientMessage(playerid, COLOR_YELLOW, string); } }else{ format(string, sizeof(string), "You are not a cop", giveplayerid); SendClientMessage(playerid, COLOR_YELLOW, string); } }else{ format(string, sizeof(string), "He/She is already jailed", giveplayerid); SendClientMessage(playerid, COLOR_YELLOW, string); } }
NEW ERRORS:
Код:
C:\Documents and Settings\Gustavo\Desktop\samp02Xserver.win32\pawno\include\Seifader.inc(71) : warning 203: symbol is never used: "reason" C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\LVCNR.pwn(325) : error 017: undefined symbol "strtok" C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\LVCNR.pwn(325) : error 033: array must be indexed (variable "cmd") C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\LVCNR.pwn(417) : error 017: undefined symbol "strtok" C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\LVCNR.pwn(417) : error 033: array must be indexed (variable "tmp") C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\LVCNR.pwn(428) : error 017: undefined symbol "giveplayer" C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\LVCNR.pwn(428) : error 017: undefined symbol "giveplayer" C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\LVCNR.pwn(428) : error 029: invalid expression, assumed zero C:\DOCUME~1\Gustavo\Desktop\SAMP02~1.WIN\GAMEMO~1\LVCNR.pwn(428) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.
Код:
409 = tmp = strtok(cmdtext, idx); 410 = if(!strlen(tmp)) { 414 = giveplayerid = strval(tmp); 416 = if(jailed[giveplayerid]==0) { 418 = if (IsPlayerConnected(giveplayerid)) { 420 = GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));