OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ponq on 12 Jul 2004, 15:14:21
-
Does some1 know how to get the " in a string?
Why?
I want the have a text in a dialog which can be copied and pasted into a script.
eg.:
_dude = SwithcMove "Combat"
Now, the animation (Combat) changes, so I have:
_text = "_dude = SwitchMove " + _anim
How do I get " around the animation in the _text string?
Help appreciated, thnx.
-
Yes, unbelievable crap this is, being used to Java/C like languages, I expected a escape character (like \, which they actually DID use in \n). Turns out it is done like this "", go figure.
So in your case that would make;
_text = "_dude = SwitchMove """ + _anim + """"; ??? (tested it and hey, it worked 8))
Count the "'s.... it really stinks...
BTW, couldn't you find this with the search?
-
Thanks for the fast response!
And soz, couldn't find it in the search.
Btw, don't be bothered with the syntax error with switchmove in my example...;) :P