Jump to content
Mugsy_nevo

setPylonLoadOut Init: Missing ]

Recommended Posts

Hi
I've been trying to script so I can change the pylon loadouts of aircrafts by an action on a sign.
When I put this addAction ["Blackfoot1", "Blackfoot setPylonLoadOut ["PylonLeft3", "PylonRack_1Rnd_AAA_missiles", true, [0]]"] into the Init field, I get the error message "Init: Missing ]" everytime I click on OK,
but I really dont get where its supposed to be missing. Can someone help me please?

Share this post


Link to post
Share on other sites
this addAction ["Blackfoot1", {Blackfoot setPylonLoadOut ["PylonLeft3", "PylonRack_1Rnd_AAA_missiles", true, [0]]}];

you went crazy with apostrophes

  • Like 2

Share this post


Link to post
Share on other sites

Do not use " inside ".

There're few ways to make strings, "(double quotation), '(single quotation), ""(twin-double quotation), ''(twin-single quotation), and if you need to make string inside string, use different quote.

Like below:

this addAction ["Blackfoot1", "Blackfoot setPylonLoadOut ['PylonLeft3', 'PylonRack_1Rnd_AAA_missiles', true, [0]]"]

This should work. BTW, I'd use code {} rather than string "" inside addAction as davidoss mentioned already.

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×