Norbak 10 Posted December 11, 2014 I have a problem with this: A script "Symp.sqf" and called from an action bar. I want when variables "Symp1" and "Symp2" are activated then... But it doesn't work. That easy thing and fail!. I'm confused. Anyone know? If (Symp1 && Symp2) then { SoldierDDBar = SoldierDD addaction [("<t color=""#3838ff"">" + ("Gang Bang!")+"</t>"), "scripts\symp3.sqf", [], 0, false, true, "", ""] }; Share this post Link to post Share on other sites
opusfmspol 279 Posted December 11, 2014 (edited) Your addaction works, which means your Symp1 && Symp2 don't. "if (...) then" is a boolean test - true/false. Whatever the condition result is must return "true" for the code to run. "&&" is a Boolean test - true/false. Values on both sides must return "true" for the condition to return true so the code will run. Your attempt fails because "Symp1" and "Symp2" are defined as something other than True or False. eh... scratch that, won't work on "false" (doh!) example: Symp1 = true; Symp2 = false; // Code will not run since both are not true. if (!alive _badDude) then {Symp2 = true}; // If _badDude is dead (!alive returns true) the code will run, because both Symp1 and Symp2 are true. Edited December 11, 2014 by OpusFmSPol Share this post Link to post Share on other sites
Norbak 10 Posted December 11, 2014 Then i got some wrong at the true/false on the variables Symp1 and symp2. is that correct? Share this post Link to post Share on other sites
opusfmspol 279 Posted December 11, 2014 correct. It's reading them as an object, group, number, or something else other than boolean "true" or "false", or if they are already defined as Boolean, something is not setting one or the other to "true". https://community.bistudio.com/wiki/Data_Types Share this post Link to post Share on other sites