Timers not loading.
#1

Well, I have 10 timers,
But the first three load fine,
But the adittional 7 will not. It is the exact same code in every one, except for the Value of my health goes from,
SetPlayerHealth(playerid, 10);
to
SetPlayerHealth(playerid, 20); and so on. On 10 it's 100.
But for some reason, after Timer 3, it will not load them rest.
I am probably using a outdated method for timers,
SetTimer("HealthTime", 500, 1);
I have all the correct forwards, and everything complies fine, but In-Game it just refuses to work.
If you have a simpler method for this, please let me know. As I don't use timers but once in a while.
-Thank you.

pawn Код:
public HealthTime()
{
   
    for(new i; i< MAX_PLAYERS; i++)
    {
        GameTextForPlayer(i, " ~r~Healing....", 10000, 6);
        SetPlayerHealth(i, 10);
        GiveHeath = SetTimer("HealthTime2", 500, false);
    }
}
Reply
#2

It also will cause my game to load extremely slow.
Anyone have any ideas?
-Thanks
Reply
#3

Maybe paste the timers functions?
Reply
#4

In HealthTime2, the only difference is
It's now HealthTIme3 in SetTimer, Sets the HP to 20, and the Public is ofc HealthTime2.

I have 10 timers like that, but only the first 3 work.
Reply
#5

Timer discussion

One of the causes might be mentioned there.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)