Problem with killing a timer
#2

The main thing I can see here is that you are using one variable to store the timer id, then you change it. So if playerid 1 types this command, it will set TimerCores to his timerid. Then if playerid 2 tries to do it, it will set TimerCores to his timerid. Then when playerid 1 tries to kill the timer, he's just killing playerid 2's. You see what I'm saying? If more than one player types this command, it will bug. You need to give each player a unique timerid.

http://pastebin.com/m6b1a8f65

Try that. Instead of using two variables, one to store the timerid and one to see if they've set a timer, I just used one. That way, you can store the timerid for that playerid, and also set it to -1 when it's not being used.
Reply


Messages In This Thread
Problem with killing a timer - by Coscos - 27.01.2010, 01:01
Re: Problem with killing a timer - by Backwardsman97 - 27.01.2010, 01:11
Re: Problem with killing a timer - by Coscos - 27.01.2010, 10:02
Re: Problem with killing a timer - by Coscos - 27.01.2010, 13:40
Problem with killing a timer - by Unpally09 - 27.01.2010, 14:40

Forum Jump:


Users browsing this thread: 1 Guest(s)