26.05.2015, 10:31
Hello, i found an error on this command:
What did i do wrong? and how can i fix it.
King Regards,
Код HTML:
CMD:escape(playerid, params[]) { if(GetTeam{playerid} != CLASS_CIV) return SendClientMessage(playerid, RED, "Only civilians can use this command."); if(IsJailed{playerid} == false) return SendClientMessage(playerid, RED, "Your not in jail."); //if(CanESC{playerid} == false) return SendClientMessage(playerid, RED, "Plsease wait before trying to escape jail again.");// new escrand = random(5); switch(escrand) { case 0: { SetPlayerHealth(playerid, 100.0); SetPlayerInterior(playerid, 3); SetPlayerPos(playerid, 200.6972, 168.2653, 1003.0234); SetPlayerFacingAngle(playerid, 89.0391); SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 6); PlayerInfo[playerid][pCrimes] ++; format(fstr, sizeof(fstr),"[DISPATCH]: Suspect %s [%d] has just escaped jail at LVPD.", GetName(playerid), playerid); CopRadio(BLUE, fstr); SendClientMessage(playerid, LIGHTGREEN, "You have escaped jail!"); format(fstr2, sizeof(fstr2), "%s [%d] has just escaped jail at LVPD.", GetName(playerid), playerid); SendClientMessageToAll(RED, fstr2); SendClientMessage(playerid, RED, "County jail escape. [WANTED LEVEL INCREASED]"); IsJailed{playerid} = false; KillTimer(JailTimer[playerid]); JailTime[playerid] = 0; PlayerInfo[playerid][jTime] = 0; if(IsPlayerConnected(playerid) && IsLoggedIn{playerid} == 1) { SaveUserStats(playerid); } } return true; }
Код HTML:
C:\Users\Charalambos\Desktop\NVCNR\gamemodes\NVCNR.pwn(20182) : error 002: only a single statement (or expression) can follow each "case" C:\Users\Charalambos\Desktop\NVCNR\gamemodes\NVCNR.pwn(20182) : warning 215: expression has no effect C:\Users\Charalambos\Desktop\NVCNR\gamemodes\NVCNR.pwn(20183) : warning 209: function "cmd_escape" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
King Regards,