I made it 'stopt' but now it crashes. the error was something like: Overflow(511) Time Left:2:30 (Time Left 2:30 is the text and 2:30 is just random becaus it's counts down)
This is the code:
Code:
doEndingTimer()
{
self endon("stopt");
level.min = 4;
level.sec = 60;
while(1)
{
wait 1;
level.sec--;
if(level.sec == 0)
{
if(level.min == 0)
{
foreach(player in level.players)
{
player suicide();
self thread maps\mp\gametypes\_hud_message::hintMessage("Humans Win");
level.min = 4;
level.sec = 60;
}
return;
}
else
{
level.min--;
level.sec = 60;
}
}
}
}
And this in a other thread.
Code:
self.HintText setText("Time Left: "+ level.min +":"+ level.sec);
I mostly crashes around 1:00 and 2:00