mind 60 Posted November 11, 2016 Hi all, I encountered rather strange and very dangerous bug. Following code will execute, but will ignore structure elements like IF blocks. Resulting in both lines written. _action = ' if (true) then { hint "This line MUST print" } else { hint "This line MUST NOT print" } '; _button buttonSetAction _action; Pressing this button will result in printing both lines with no errors, it is if like there were no IF block or it`s evaluation skipped. However following code will execute as expected _action = 'if (true) then {hint "This line MUST print"} else {hint "This line MUST NOT print"}'; _button buttonSetAction _action; It looks like newlines and tabs, causing this strange behaviour. P.S. Other workaround for buttonSetAction is using calling global function. Share this post Link to post Share on other sites
killzone_kid 1329 Posted November 11, 2016 Strange indeed, but not really if you consider that the button statement is expected to be in SQS format: https://community.bistudio.com/wiki/SQS_syntaxI have updated BIKI: https://community.bistudio.com/wiki/buttonSetAction Share this post Link to post Share on other sites
mind 60 Posted November 13, 2016 Now that makes sanse, thanks KK Share this post Link to post Share on other sites