Members | Sign In
All Forums > Mission Scripting
avatar

"Fun" scripting / variable issue, no underscores!

posted Apr 16, 2013 16:33:52 by RyanDriskel
It took me a good five hours to figure out why my mission was not doing what I coded it to do.

You cannot use an underscore in the variable name if you wish to use the expression evaluator.

Save yourself some pain and avoid using underscores in variables :D
page   1
3 replies
avatar
zthumser said Apr 16, 2013 18:13:02
Something isn't right here. I've only just started playing with the scripting, so forgive me if I'm a bit of a noob regarding scripting, but I have a mission that I've been working on that uses tons of variables with underscores in the expression evaluator, and it works great. That's using Artemis 1.702 (and if it's relevant, Artemis Mission Editor 13.03.26.1). Just to be clear, you're talking about a statement like:
<set_variable name="variable_with_underscores" value="variable_with_underscores+different_variable" />
Works fine for me.
avatar
BrianKuragiman said Apr 16, 2013 22:09:39
I use underscores as well in my variable naming conventions. shields_up_check, admiral_knox_talked, etc.

All works fine so far for me.
avatar
RyanDriskel said Apr 16, 2013 22:29:15
Well I don't know what to say guys, except I am glad you didn't have to struggle with it! When I finally decided to try it, I converted all my variables to no underscores and the same exact code started working perfectly. I'll check what versions I am running.
Login below to reply: