Blockland Forums > Modification Help

Schedules Going Haywire!?

Pages: (1/5) > >>

Greek2me:

Whenever I set a schedule above about 20-30 minutes, the schedule goes crazy and loops every millisecond, however, when set below that, it acts normally:

--- Code: ---function functionhere()
{
    cancel($varhere);
    //stuffhere
    $varhere = schedule(60000*30,0,functionhere);
}
--- End code ---

This also happens with several other mods. To get a good example of this, check out the Auto Saver and set the autosave time higher than 30- exact same issue I described.

Any ideas on how to fix this?

Thanks

otto-san:

try using an outside global var or something for the minutes

and then a local variable for speed that multiplies it?

that's all i got

Greek2me:

Actually I already have a global variable in place of the schedule amount. Let me try without using variables..

Xalos:

function servercmdcallStuff(%client, %t)
{
^Stuff(%t);
}
function Stuff(%t)
{
^if(%t =< 0)
^{
^^stuffHappens;
^}
^else
^^schedule(1000, 0, "Stuff", %t--);
}

You might want to increase the schedule time loop based on what it's doing, but that's a good base for long schedules.

Greek2me:

That's what I already have, plus some stuff I don't want/need in there...

Pages: (1/5) > >>

Go to full version