2 for(;;) loops
Hey all.
I was just do some coding, and I'm almost finished with it.
But I got a problem with 2 for(;
loops :
I know both codes works perfectly, but they seem not to work at the same time ...?
Can someone help me with this ^^.
PS: Somebody knows a code that wait for 2 things at the ssame time like waittill( "player_spawned" || "player_connected" );?
I was just do some coding, and I'm almost finished with it.
But I got a problem with 2 for(;
loops :Code:
Somethread()
{
if(something)
{
waittillspawn();
waittillprematch();
}
}
waittillprematch()
{
for(;;)
{
level waittill("prematch_over");
DoSomething();
}
}
waittillspawn()
{
for(;;)
{
foreach(player in level.players)
{
player waittill("spawned_player");
DoSomething();
}
}
}
Can someone help me with this ^^.
PS: Somebody knows a code that wait for 2 things at the ssame time like waittill( "player_spawned" || "player_connected" );?
