22.08.2015, 13:20
I get this error when compiling
This is my code on line 11667 (its a command actually)
Return 1; is line 11667
thanks, dunno how to fix this. please help
Код:
/gamemodes/OnGameMode.pwn(11667) : error 001: expected token: ";", but found "-identifier-" /gamemodes/OnCommand.pwn(18109) : warning 202: number of arguments does not match definition /gamemodes/OnCommand.pwn(18109) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
COMMAND:jail(playerid, params[]) { new text[128],time,targetid,string[256],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME]; if(sscanf(params, "uis[128]", targetid, time, text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /jail [playerid] [minutes] [reason]"); else { if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this."); if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, "This player is not connected !"); if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, COLOR_GREY, "Can't do this to a NPC."); if(strlen(text) >= 100) return SendClientMessage(playerid, COLOR_WHITE, "Reason is too long."); if(GetPVarInt(playerid, "Admin") >= 2) { format(sendername, sizeof(sendername), "%s", AdminName(playerid)); format(giveplayer, sizeof(giveplayer), "%s", PlayerName(targetid)); GiveNameSpace(sendername); GiveNameSpace(giveplayer); format(string, sizeof(string), "AdmCmd: %s was jailed by %s, reason: %s", giveplayer, sendername, text); SendAdminMessage(COLOR_LIGHTRED, string); SetPVarInt(targetid, "Jailed", 2); SetPVarInt(targetid, "JailTime", time*60); strmid(PlayerInfo[targetid][pJailReason], text, 0, strlen(text), 255); format(string, sizeof(string), "You are jailed for %d minutes.", time); SendClientMessage(targetid, COLOR_WHITE, string); format(string, sizeof(string), "REASON: %s.", text); SendClientMessage(targetid, COLOR_WHITE, string); SetPlayerPos(targetid,2523.9197,-1673.8944,14.8589); TogglePlayerControllableEx(targetid, false); SetPlayerInterior(targetid, 0); SetPlayerVirtualWorld(targetid, targetid); SetPVarInt(targetid, "Jails", GetPVarInt(targetid, "Jails")+1); SetPVarInt(targetid, "Mute", 1); } else { SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !"); } } return 1; }
thanks, dunno how to fix this. please help