killshot 5 Posted December 22, 2015 Hello people, could someone help me with this small function, please? I want to have the possibility to give an argument to choose between "ACE_Wheel" and "ACE_Track". [player,"track"] call fnc_grabSparePart or [player,"wheel"] call fnc_grabSparePart fnc_grabSparePart = { private ["_caller","_sparePart","_choice"]; _caller = _this select 0; _sparePart = _this select 1; if (_sparePart isEqualTo "Track") then {_sparePart = "ACE_Track"}; if (_sparePart isEqualTo "Wheel") then {_sparePart = "ACE_Wheel"}; _choice = _sparePart createVehicle (position _caller); [_caller,_choice] call ace_dragging_fnc_startCarry; }; Spend a couple hours without success. Kind regards. Share this post Link to post Share on other sites
f2k sel 164 Posted December 22, 2015 May be it's a case sensitive issue "wheel" "Wheel" "track" "Track" isEqualTo is case sensitive I just checked. Share this post Link to post Share on other sites
Nathan423 10 Posted December 22, 2015 Do you have "show script errors" turned on, as it tells you where in your script is breaking. Share this post Link to post Share on other sites
killshot 5 Posted December 22, 2015 Thank you both for your responses. I can't believe I was too lazy to press shift-key all these hours, it's working now, thank you f2k sel. :bounce3: Share this post Link to post Share on other sites
R3vo 2654 Posted December 22, 2015 Thank you both for your responses. I can't believe I was too lazy to press shift-key all these hours, it's working now, thank you f2k sel. :bounce3: then {_sparePart = "ACE_Wheel}; But there's also a mistake in this line ?!? Share this post Link to post Share on other sites
killshot 5 Posted December 22, 2015 Oh yes, you are right, I changed from if else to two ifs here in the forum version. Thank's I corrected it in the first post. Share this post Link to post Share on other sites