SA-MP Forums Archive
SetTimerEx not working - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetTimerEx not working (/showthread.php?tid=235703)



SetTimerEx not working - Kwilow - 06.03.2011

I'm having trouble getting getting SetTimerEx working, have tried passing different variable in various formats, also have tried "i" "d" "a". The code below doesn't give me errors put doesn't work. The purpose of this is just a flag, to give players time to get out of a teleport pickup. Any help would be appreciated

forward ExitMessage(playerid); //,Businessleave[]);




Businessleave[playerid] = 1;
format(string, sizeof(string), " Businessleave variable = ~w~~y~.",Businessleave[playerid]);
GameTextForPlayer(playerid, string, 5500, 3);
SetTimerEx("exitMessage",5000,0,"i",playerid); //,Businessleave[playerid]);


Displays the string but Businessleave[playerid] not passing a variable, although appears to be working as enterpickups skipped


public ExitMessage(playerid) //,Businessleave[])
{
GameTextForPlayer(playerid, "~r~Timer Complete", 5000, 1);
Businessleave[playerid] = 0;
}


No display from the timer at all


Re: SetTimerEx not working - Calgon - 06.03.2011

Do you see the gametext when that snippet of code is called?


Re: SetTimerEx not working - Kwilow - 06.03.2011

Only the first game text shows, but with no variable passed.

The game text in the timer code does not show at all, nor does the variable reset to 0


Re: SetTimerEx not working - Calgon - 06.03.2011

pawn Код:
SetTimerEx("ExitMessage",5000,0,"i",playerid);
Try this, there was a case mismatch. Your timer tried to call "exitMessage" instead of "ExitMessage."


Re: SetTimerEx not working - Kwilow - 06.03.2011

Doh, I knew it had to be something simple, as they are the things normally overlooked. Thats i'll implement that and see how it goes.


Re: SetTimerEx not working - Kwilow - 06.03.2011

works now, still not passing the variable to the text, but that was only for tracing purposes. It resets the variable and enables pickups again. Thanks