ID:155065
 
if u use a text variable in a switch alert why does it give you error messages, this code:

switch(alert("what attack do you want to use?",,"[O]","[J]"))
if("[J]")
usr << "uses attack [J]"


gives me this error:

error: : expected a constant expression


how would I get around this?
Well you could define those variables as constant variables, but that wouldn't let you to edit them.

I think it's impossible.