14.12.2012, 00:02
I am trying to make a command for a event prize but get a error.
Script
Error:
Script
Код:
CMD:eventprize(playerid, params[]) { new string[128], playerb, prize,; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(sscanf(params, "ui", playerb, event)) { SendClientMessage(playerid, COLOR_WHITE, "/setstat [playerid] [prizeid]"); SendClientMessage(playerid, COLOR_GREY, "Prizes: 1 | 2"); return 1; } if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id."); switch(stat) { case 1: { GiveZaiatMoney(playerid, 50000); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); format(string, sizeof(string), "%s has givin %s $50,000 and full health and armor", RPN(playerid), RPN(playerb)); SendClientMessageToAll(COLOR_LIGHTRED, string); } } Log("logs/eventprize.log", string); return 1; }
Код:
C:\Users\Michael\Desktop\*\other\GTA\My server\ARP\gamemodes\ARP.pwn(3431) : error 001: expected token: "-identifier-", but found ";" C:\Users\Michael\Desktop\*\other\GTA\My server\ARP\gamemodes\ARP.pwn(3434) : error 017: undefined symbol "event" C:\Users\Michael\Desktop\*\other\GTA\My server\ARP\gamemodes\ARP.pwn(3441) : error 017: undefined symbol "stat" C:\Users\Michael\Desktop\*\other\GTA\My server\ARP\gamemodes\ARP.pwn(3431) : warning 203: symbol is never used: "prize" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.