OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: JasonO on 26 May 2007, 18:56:59
-
Hi
Simple question, but to a difficult answer..
How can I use a variable in the AddAction Name?
I tried:
value = "value variable"
this addaction ["format ["%1",value]",script1.sqs]
No luck.. Any idea guys?
Cheers.
-
Looking at your example:
value = "value variable"
_actionname = format ["%1",value]
this addaction [_actionname,"script1.sqs"]
Am I missing something :blink:
-
Seems like JasonO forgot to remove the " ", right now there would be a double string ("" with a string inside).
If it still doesn't work, I am missing something too.
-
lol just finished playing with PHP and i've been writing things like stuff = "this";
I didn't copy and paste the variable line, only the addaction line so I quickly wrote it in my post... woops :-[
I'll try what you've said tomorrow when I have access to my computer again. Thanks guys.