mob
Mod
verb
Conjure()
var/obj/a = input("What would you like to conjure?","GM") in list("Food","Water","potions")
if("[a]")
new a(usr)
usr << "You conjure a [a]"
ID:144058
Apr 13 2007, 9:57 am
|
|
Code:
|
Apr 13 2007, 10:03 am
|
|
And the error is...?
|
If("[a]") will always be true.
You're getting switch() if()s mixed up with normal if()s. Normal use of an if: if(a=="Food") Normal use of a switch() if(): switch(a) |
Please read and re-read your code before posting, because I know you're smart enough to catch this. :O
<code> a = "text string" new a(usr)</code> You're trying to use a text string with new()... a normal text string at that (technically using a text string is valid there, but of a type path such as "/mob"). |