Error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error (
/showthread.php?tid=501440)
Error -
AroseKhanNiazi - 18.03.2014
Код:
KillTimer(ad_timer1[playerid]);
KillTimer(DRUG_TIMER[playerid]);
these are on player death
error
Код:
(3671) : error 028: invalid subscript (not an array or too many subscripts): "DRUG_TIMER"
(3671) : warning 215: expression has no effect
(3671) : error 001: expected token: ";", but found "]"
(3671) : error 029: invalid expression, assumed zero
(3671) : fatal error 107: too many error messages on one line
Line 3671
Код:
KillTimer(DRUG_TIMER[playerid]);
Re: Error -
AroseKhanNiazi - 18.03.2014
I tried i just added it to game mode it won't work and all other things are fine i checked that it it there yeah the timer was there but and i checked that i put ";" this at end and it was fine
Re: Error -
LocMax - 18.03.2014
do you have
new DRUG_TIMER[MAX_PLAYERS];
somewhere in script, if yes where?
Re: Error -
AroseKhanNiazi - 18.03.2014
Quote:
Originally Posted by LocMax
do you have
new DRUG_TIMER[MAX_PLAYERS];
somewhere in script, if yes where?
|
NO I HAVE forward DRUG_TIMER(playerid);
public DRUG_TIMER_RESPONSE(playerid)
{
new Float:health;
GetPlayerHealth(playerid,health);
DRUG_TIMER_RESPONSE1[playerid] = SetTimerEx("DRUG_TIMER_RESPONSE", 2000, false, "i", playerid);
if (health < 95.0)
{
SetPlayerHealth(playerid, health+3);
}
return 1;
}
but it's after all cmds and after on playerd death
Re: Error -
LocMax - 18.03.2014
add new DRUG_TIMER[MAX_PLAYERS]; on top of your script.
Re: Error -
AroseKhanNiazi - 18.03.2014
fixed btw it wasn't the problem