Author Topic: Anything more reliable than schedules for script loops?  (Read 4248 times)

you shouldn't use $Sim::Time because if the server is up for a long time the numbers will be so large it will cause glitches

Wouldn't it be the other way around?

$Sim::Time returns a floating point while getSimTime() returns an integer, so wouldn't $Sim::Time be better for longer times?

I think he was just being a troll.
why would I be trolling? While loops are probably the best if you know how to use them properly.

Wouldn't it be the other way around?

$Sim::Time returns a floating point while getSimTime() returns an integer, so wouldn't $Sim::Time be better for longer times?
you should use $sim::time because it's in seconds while getsimtime() is in milliseconds

why would I be trolling? While loops are probably the best if you know how to use them properly.
I think it's because you said "while true loop" instead of just "while loop", which has the potential to sound like you're talking about this:
Code: [Select]
while(true){}...Which we all know crashes Blockland.

you should use $sim::time because it's in seconds while getsimtime() is in milliseconds

Yes, exactly.

I think it's because you said "while true loop" instead of just "while loop", which has the potential to sound like you're talking about this:
Code: [Select]
while(true){}...Which we all know crashes Blockland.
not exactly, it holds blockland up. If you have it execute for a while and then break; out of it with some logic you'll be fine.

Good for if there are multiple end conditions.

not exactly, it holds blockland up. If you have it execute for a while and then break; out of it with some logic you'll be fine.

Good for if there are multiple end conditions.
True. Mine just never exited, so... It was essentially a crash for me. XD