ID:263320
 
Code:
world
name="Rumble Arena 3:The Ending That Never Was"
version=1
status="<font color=red><b>{Rumble Arena 3}<font color=blue>{Players:[length(Players)]}</font>"


Problem description:Ok for some reason it will not let me include a var in world.staus is there a way to do this or is there a error on my part seeing the error is
loading Script.dms
Index.dm:4:error::expected a constant expression

Rumble Arena 3.dmb - 1 error, 0 warnings (double-click on an error to jump to it)


Just like in any variable defined at compile time, it has to have a constant, or definate, value.

If you want to set it to show the number of players, you'll have to update it whenever a new player joins or one leaves. You could also just give it a timer.

world/status = "Loading..."

proc/Update_World_Status()
world.status="<font color=red><b>{Rumble Arena 3}<font color=blue>{Players:[Players.len]}</font>"

var/list/Players=list()

mob
Login()
Players+=src
Update_World_Status()
..()
Logout()
Players-=src
Update_World_Status()
del(src)


That's how I do it.

When it gives that error, it means that it must have a static (not dynamic-meaning changable) string...


Make a small proc or somethign which can be called to update the world.status, or change the line when something happens..
er what I mean is this:
world
status="This default must be static"

proc/UpdateStatus() world.status="<font color=red><b>{Rumble Arena 3}<font color=blue>{Players:[length(Players)]}</font>" //reason why I want to use a proc is so if you need to make a change, only one place needs to be changed instead of a multiple lines scattered around.


mob/Login()
Players+=src //assuming that's how your Players list works... since this changed, we want to update the status
world.UpdateStatus()

mob/Logout()
..()
Players-=src
world.UpdateStatus()

..()

- GhostAnime - Um, got that?

Edit: Dang you Dark ;)
In response to GhostAnime
thank you.