ID:147719
 
My statpanel keeps freezing.

mob
Stat()
statpanel("Monitor")
var/time = time2text(world.time,"mm:ss")
stat("Running for","[time]")
var/response = world.Export("[Furion]?ping")
var/num = response
if(response)
stat("Status","Online")
stat("Players","[num]")
else
stat("Status","Offline")
stat("Players","N/A")


That's my statpanel. It keeps freezing. Any fixes?
PBYOND wrote:
My statpanel keeps freezing.

> mob
> Stat()
> statpanel("Monitor")
> var/time = time2text(world.time,"mm:ss")
> stat("Running for","[time]")
> var/response = world.Export("[Furion]?ping")
> var/num = response
> if(response)
> stat("Status","Online")
> stat("Players","[num]")
> else
> stat("Status","Offline")
> stat("Players","N/A")
>

That's my statpanel. It keeps freezing. Any fixes?

maybe take the else away


mob
Stat()
statpanel("Monitor")
var/time = time2text(world.time,"mm:ss")
stat("Running for","[time]")
var/response = world.Export("[Furion]?ping")
var/num = response
if(response)
stat("Status","Online")
stat("Players","[num]")
stat("Status","Offline")
stat("Players","N/A")

if not i need to know the errors.
In response to CrazyFighter
Dude. As I said in the first post (but you didn't read), there are NO errors!

It's just a bug! A big bug!
NOTHING appears to change on my Stat().

var/time = time2text(world.time,"mm:ss")
stat("Running for","[time]")

This small lil' bit of code should make it so that each second it'll increase by 1.
So 00:00 will go 00:01 and 00:02 etc.
But it mysteriously stopped at 00:07. And it didn't increase...while if I use an verb to check it, it DOES increase.
In response to PBYOND
PBYOND wrote:
Dude. As I said in the first post (but you didn't read), there are NO errors!

It's just a bug! A big bug!
NOTHING appears to change on my Stat().

var/time = time2text(world.time,"mm:ss")
stat("Running for","[time]")

This small lil' bit of code should make it so that each second it'll increase by 1.
So 00:00 will go 00:01 and 00:02 etc.
But it mysteriously stopped at 00:07. And it didn't increase...while if I use an verb to check it, it DOES increase.

wired if i use it in a code it don't stop.
I don't think Stat is a good place too use world.Export().

The "freeze" is mentioned in the reference entry for Export proc (world).
"Note that this will cause the caller to sleep while waiting for the necessary data to be transfered."