I've been testing various things within the code and came up to an unusual problem which I'm unsure of the exact cause or nature of it to really know if it's just byond not handling it well or perhaps it's the way I coded it that may be causing the real issue here.
Basically I've created a rather large loop, but the loop is fairly delayed and doesn't cause any major issues... at least initially.
I define a variable as 0 and count to 255. When it reaches 255 it'll reset back to 0. While it's counting it'll do various things like flick an icon etc. Each time the loop is counted it sleeps by about 2 byond ticks, so sleep(2) is typically used.
An example of the above would be like...
if(counter == 10) flick("something",src)
if(counter >= 255) counter = 0
Now running this in single mode causes no crashing or anything, but hosting it does eventually crash the clients computer but not the server.
The above is just a simple breakdown of the type of thing i'm trying to do. There are other flicks and general variable changes that do occur such as setting something from 1 to 0 or vice versa. Nothing serious and each setting individually has caused no errors or crashes to the server itself. It's seems to be related to the counting itself or maybe the flicks are overloading the clients computer i have no clue.
Anyone have any thoughts on this?