Ilias38rus 5 Posted September 15, 2015 what's wrong? if (_x == B_officer_F) then { _pa = [_x addaction ["Set commander","obgects\sobjectshqaddc.sqf","_x"]]; _x setVariable [_pa]; }; sobjectshqaddc.sqf _la1 = []; _la2 = []; _la1 = [_this select 0]; aobgectshqu = aobgectshqu + _la1; _la2 = [(_this select 0) getVariable "_pa";]; (_this select 0) removeaction str (_la2); Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted September 15, 2015 You really need to enable -showScriptErrors, the first line compares an object with a global variable. So unless you named an object B_officer_F the condition will throw an error. Also your setVariable syntax is missing stuff, you just put _pa as the variable name, missing the value. _pa contains a script command adding an action, why you want to set this as a variable name is beyond me. Maybe you should take a closer look at the community wiki get your hands on some more basic stuff first and try stuff out, instead of opening a thread for every other issue you're running across/that's way beyond your actual scripting knowledge. And as said in an earlier thread of yours, using variable names like _la1 etc might work for you, which is fine, but it's a pain for everyone who wants to actually help you and see through your code. Cheers Share this post Link to post Share on other sites
Ilias38rus 5 Posted September 15, 2015 On 9/15/2015 at 3:22 PM, Grumpy Old Man said: You really need to enable -showScriptErrors, the first line compares an object with a global variable. So unless you named an object B_officer_F the condition will throw an error. Also your setVariable syntax is missing stuff, you just put _pa as the variable name, missing the value. _pa contains a script command adding an action, why you want to set this as a variable name is beyond me. Maybe you should take a closer look at the community wiki get your hands on some more basic stuff first and try stuff out, instead of opening a thread for every other issue you're running across/that's way beyond your actual scripting knowledge. And as said in an earlier thread of yours, using variable names like _la1 etc might work for you, which is fine, but it's a pain for everyone who wants to actually help you and see through your code. Cheers Jus calm will say this is small pies of script, i need help with understanding how " Saving values in object's personal space " working, all variables are defined and _pa is aray with number, which id of the action, not the command Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted September 15, 2015 You should ask the person who obfuscated the code for help. Unless it is you doing that, then just lol. 1 Share this post Link to post Share on other sites