Timer on command problem [Solved]
#1

Код:
 	if(strcmp(cmdtext, "/usedrugs", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  	{
			if(PlayerInfo[playerid][pDrugs] > 1)
			{
				if(UseDrugs[playerid] == -1) return SendClientMessage(playerid, COLOR_RED, "You have to wait 30secounds before using drugs again.");
				{
	  			 	new Float:armour;
			  	GetPlayerArmour(playerid, armour);
			  	if(armour < 100.0)
				  {
	        	SetPlayerArmour(playerid, armour + 15.0);
	        }
			  	SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] 2 grams used.");
			  	PlayerInfo[playerid][pDrugs] -= 2;
			  	PlayerActionMessage(playerid,15.0,"has just took some drugs.");
			  	DrugsIntake[playerid] += 2;
			  	if(DrugsIntake[playerid] >= 2)
    			{
				  	SetTimerEx("DrugEffect", 1000, false, "i", playerid);
				  	}
					SetTimer("UseDrugs", 30000, false);
		 		}
				else SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You don't have any drugs.");
				}
 		}
		return 1;
	}
Код:
(9233) : error 029: invalid expression, assumed zero
Line 9233 is "else SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[ERROR:] You don't have any drugs.");"
I have got some help but nothing fixed the error, thats why im now making a thread about it.

Reply


Messages In This Thread
Timer on command problem [Solved] - by Buwla - 02.07.2009, 18:54
Re: Need help with error - by refshal - 02.07.2009, 19:15
Re: Need help with error - by Buwla - 02.07.2009, 19:49
Re: Timer on command problem - by Buwla - 03.07.2009, 12:54

Forum Jump:


Users browsing this thread: 1 Guest(s)