Blitzer134 1 Posted July 26, 2013 trying to define this code red line has the error any help would be appreciated private ["_unit"]; _unit = _this select 0; WaitUntil{(getPos _unit select 2)<2}; sleep 3; [color="#FF0000"]if((getPos _unit select 2)>2 || not (_unit in list Rearmlist)) exitWith{};[/color] _unit setFuel 0; _unit VehicleChat "Repairing......"; sleep 15; _unit setDammage 0; _unit VehicleChat "Rearming......"; sleep 12; _unit setVehicleAmmo 1; _unit VehicleChat "Refueling......"; sleep 10; _unit setFuel 1; _unit VehicleChat "Finished!"; if(true) exitWith{}; calling via trigger {[_x] execVM "script.sqf"} foreach thislist; thanks Share this post Link to post Share on other sites
unidad2pete 10 Posted July 26, 2013 if (getPos (_unit select 2) > 2) or ! (_unit in list Rearmlist)) exitWith {}; Im not professional but I think that works. The name of the trigger should be Rearmlist Share this post Link to post Share on other sites
f2k sel 164 Posted July 26, 2013 It's working fine, check trigger name as mentioned or if your using an array ie Rearmlist = [unit1,unit2,unit3] remove the list bit. Share this post Link to post Share on other sites
unidad2pete 10 Posted July 26, 2013 if (((getPos _unit select 2) > 2) or ! (_unit in list Rearmlist)) exitWith {}; I'm sorry I was wrong, this works sure :) And yes, your script works too, be sure name your trigger with Rearmlist Share this post Link to post Share on other sites
Blitzer134 1 Posted July 26, 2013 perfect guys thanks a lot this community rules :) Share this post Link to post Share on other sites