Anteq Iney 0 Posted July 21, 2020 Hello, I need a script that will display my holdaction if the player has an item in his inventory. My script that doesn't work: if (playerside == west) then { { [_x,"<t color='#FFAA00'>Remove!</t>", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa", "_this distance _target < 4", "(_caller distance _target < 4) && ("ToolKit" in items _caller)", {[_target, "wire_s",100] spawn CBA_fnc_globalSay3d;}, {}, {deleteVehicle _target;}, {}, [], 9, 0, true, false] call BIS_fnc_holdActionAdd; } forEach wire; }; Arma writes that there is an error in the line: "(_caller distance _target < 4) && ("ToolKit" in items _caller)", Where is the error and why it doesn't work? Share this post Link to post Share on other sites
gc8 968 Posted July 21, 2020 at least there's problem with the quotes with "ToolKit". try changing those to the ' . like so: 'ToolKit' 1 Share this post Link to post Share on other sites
POLPOX 753 Posted July 21, 2020 You can't use " inside ", which will break the string. Use ' instead. "(_caller distance _target < 4) && ('ToolKit' in items _caller)" 1 1 Share this post Link to post Share on other sites
Anteq Iney 0 Posted July 21, 2020 7 minutes ago, POLPOX said: You can't use " inside ", which will break the string. Use ' instead. "(_caller distance _target < 4) && ('ToolKit' in items _caller)" Yes, now it is working, thank you very much! Share this post Link to post Share on other sites