/eventprize help
#1

I am trying to make a command for a event prize but get a 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;
}
Error:
Код:
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.
Reply


Messages In This Thread
/eventprize help - by MichaelWharton101 - 14.12.2012, 00:02
Re: /eventprize help - by LarzI - 14.12.2012, 00:12
Re: /eventprize help - by MichaelWharton101 - 14.12.2012, 00:18
Re: /eventprize help - by maramizo - 14.12.2012, 00:21
Re: /eventprize help - by LarzI - 14.12.2012, 00:22
Re: /eventprize help - by MichaelWharton101 - 14.12.2012, 00:27

Forum Jump:


Users browsing this thread: 3 Guest(s)