Cigs4 18 Posted February 27, 2022 Hello, guys! Could someone please tell me what is wrong with this script? It doesn't work and I have no idea what could be wrong. It's a script to be used on a dedicated server, I'm running it via initServer. Any help will be greatly appreciated. Thanks. sleep 5; if (side _x == WEST) then { { removeVest _x; removeBackpack _x; removeHeadgear _x; _x addVest "rhs_6sh92"; _x addHeadgear "rhsgref_helmet_pasgt_erdl"; _x unlinkItem "ItemRadio"; _x Skill 0.65; }forEach allUnits; }; Share this post Link to post Share on other sites
_foley 192 Posted February 27, 2022 if (side _x == WEST) then _x is undefined at that point so that's where it fails. Did you mean to put that if inside the foreach loop instead? Share this post Link to post Share on other sites
beno_83au 1369 Posted February 28, 2022 Put the forEach loop and the side check down one each: sleep 5; { if (side _x == WEST) then { removeVest _x; removeBackpack _x; removeHeadgear _x; _x addVest "rhs_6sh92"; _x addHeadgear "rhsgref_helmet_pasgt_erdl"; _x unlinkItem "ItemRadio"; _x Skill 0.65; }; }forEach allUnits; Share this post Link to post Share on other sites
pierremgi 4906 Posted February 28, 2022 { removeVest _x; removeBackpack _x; removeHeadgear _x; _x addVest "rhs_6sh92"; _x addHeadgear "rhsgref_helmet_pasgt_erdl"; _x unlinkItem "ItemRadio"; _x setSkill 0.65 }forEach (allUnits select {side _x == WEST}) 5 Share this post Link to post Share on other sites
Cigs4 18 Posted March 5, 2022 Thanks a lot, guys! Much appreciated. 👍 Share this post Link to post Share on other sites