world
name="DBZeta Classic Remix Server [host] is Hosting."
I get this error
new_char_handling.dm:64:error::expected a constant expression
ID:175849
![]() Mar 4 2003, 2:16 pm
|
|
world I get this error new_char_handling.dm:64:error::expected a constant expression |
Coolroman123 wrote:
world I get this error new_char_handling.dm:64:error::expected a constant expression Well, I'll forgo the obvious joke. The reason this is a problem is that the [] syntax is only good inside a proc. Remember, the code you just showed has to be interpreted when the game is compiled, and the compiler doesn't know in advance who the host is going to be. What you really want is to set this in a proc. Setting it in mob/Login() will do, at the same time you set the host var. Lummox JR |
ahhhhh IT messed up.
What I am trying to do is to is have the name of the world tell who is hosting.How would I do this? |
Coolroman123 wrote:
ahhhhh IT messed up. You'll have to be more specific. How did you try to change the code? What does it look like now? Lummox JR |
var/global/address |
world.name wants a constant expression. Because you put "[host]" when setting the value of world.name, it is no longer a constant because the value of host can change. To fix it, remove "[host]" from your string.