Nielsen 10 Posted August 31, 2010 As the headline states, I am having a problem using format when setting trigger statements in a script. What I am really trying to do is to transfer a local variable to a trigger. IEDtrigger setTriggerStatements ["this",format["%1 action [""TOUCHOFF"",%1]",_ai],""]; _ai is defined and private above. I get a script-error telling me that I'm missing a ; but I cant figure out where. Any help would be greatly appreciated. Thanks Share this post Link to post Share on other sites
shuko 59 Posted August 31, 2010 And _ai contains an object/unit without a name (set in editor or setvehiclevarname)? In that case the trigger will look something like: C 1-1-A 1 action... Which will break the trigger, it doesn't understand your reference to the object. So, name the unit first. Share this post Link to post Share on other sites
Nielsen 10 Posted August 31, 2010 Aha. That was exactly it. It returned C 1-1-A 1 as the unit name, but I did'nt realize that the trigger would'nt accept that as legal input. Should have given more information about my problem - well spotted. Thanks for the help! Share this post Link to post Share on other sites