ID:139948
 
I have this set up:
mob/Stat()
if(global.GameInProgress==1)
return
statpanel("Game Info")
stat(global.players)
stat("[global.Players]/14")
if(usr.Joined)
stat(Leave_Game2)
else
stat(Join_Game2)
if(usr.host)


What's the problem, you might ask?

If I set global.GameInProgress to 1, instead of actually doing what it is expected to do and basically get rid of the Game Info statpanel, instead it removes the "Commands" verb panel and none of the things in the Game Info statpanel are clickable. I can still use the verbs in the Commands verb panel, however. If I exit out and open it up again (whilst hosted) it works.

Any help?
The behavior you're describing sounds like a bug. If you can, try to distill this down to a small demo that shows the problem in action. If you can produce the problem reliably with the demo, you can post it in a bug report and I'll investigate from there.

Lummox JR
You can work around it by:
Removing the return
Tabbing everything below the return in once more
Changing the if to if(!global.GameInProgress)
In response to Falacy
Falacy wrote:
You can work around it by:
Removing the return
Tabbing everything below the return in once more
Changing the if to if(!global.GameInProgress)
It didn't fix it, in fact, it's still the exact same problem, and this is my code:
mob/Stat()
if(!global.GameInProgress)
statpanel("Game Info")
stat(global.players)
stat("[global.Players]/14")
if(usr.Joined)
stat(Leave_Game2)
else
stat(Join_Game2)
if(usr.host)
stat(Start_Game2)
In response to Xyphon101
Yup, I don't know what I was talking about o.O
Works fine for me either way actually.
Are the verbs on the objects you're not showing maybe?
In response to Falacy
Did you use the demo I provided in my error report?
http://www.2shared.com/file/NXAZwSUf/Demo.html

Maybe it is the way I set it up.
In response to Xyphon101
This is certainly odd, it just randomly started working, BUT I exited out and opened again and it stopped working once more.
In response to Xyphon101
Just a note on that demo code. You don't need to create the new object in world/New(), you can just declare it 'var/obj/Start_Game/Start_Game2=new'