OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kyle on 11 Sep 2003, 23:49:15

Title: Group commands that have quotations
Post by: Kyle on 11 Sep 2003, 23:49:15
Hey all,
   I have been having this problem since I got into making group commands (you know, "_x domove getpos base" foreach idiots; and all that).  My problem is when the command involves quotations.  The game gets confused ??? if I put something like: "_x setunitpos "UP"" foreach idiots.  I can't understand how to do this.  Some1 plz help fast so I can complete some missions!  :D

ChEeRs,
Sniper_Kyle ;D
Title: Re:Group commands that have quotations
Post by: ACF on 12 Sep 2003, 00:02:28
The solution's hidden in the Command Reference as an example, but not explained very well.  Use curly brackets for code strings, not quotes:

{_x setunitpos "UP"} foreach idiots

Hope that moves you on!
Title: Re:Group commands that have quotations
Post by: macguba on 12 Sep 2003, 00:03:22
You're right, the game doesn't like multiple quotes.    Fortunately you can use curly brackets { } instead of quotes.    Sometimes you need to experiment a bit to discover which set of " " need to be replaced with { } to make a line of code work.

Edit:  Damn, too slow again. :P
Title: Re:Group commands that have quotations
Post by: LCD on 12 Sep 2003, 02:00:06
actualy d games do luv double qoutes :P

if u wanna use da qoutes nd stil have it useable w/ da old ver (or just dontlike 2 use {})

u can use double qoutes inside da oder qoutes (aint clear right ? ::))

so it wil go somin like dat

"_x setunitpos ""UP""" foreach idiots

:cheers:

LCD OUT