ID:263542
 
Code:
world
status = "<p align=center><font size = 1 face= palatino linotype color = Black>Death Note Live | <font color=green>Host:[src.key]"


Problem description:

DeathNoteLive.dm:8:error::expected a constant expression

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

How do i fix this?

You cannot directly do that.

var/Host=""
mob/Login()
if(src.address=="127.0.0.1")Host=src.key
Status()
mob/proc
Status()
world.status="Host:[Host]"
In response to A.T.H.K
Except there are a few other scenarios that you didn't cover by this, which would be helpful to at least mention.

If a user is the host, the following conditions will be met:

src.address will be world.address OR src.address will be "" OR src.address will be 127.0.0.1.

However, it's also nice to have support for setting up remote hosts. I personally solve this by having an INI file with this information, specifying the host's ckey.