justenzy 10 Posted June 25, 2013 Ok, im fairly new to coding, but i have no idea what i have done wrong. if (currentWeapon "hgun_PO7_F" == player1 )then { addAction ["putaway", "HOLS.sqf"] } else { } Help would be much appreciated. Share this post Link to post Share on other sites
f2k sel 164 Posted June 25, 2013 I think you have currentWeapon "hgun_PO7_F" == player1 using the wrong format also addaction neesds a target for the action Example. if (currentWeapon player1 == "hgun_PO7_F" ) then {player1 addAction ["putaway", "HOLS.sqf"] } else { } Share this post Link to post Share on other sites
justenzy 10 Posted June 26, 2013 Thank you very much. I have adjusted the code and still nothing. player1 addAction ["putaway", "action.sqf"] action.sqf if (handgunWeapon this == "") then { hint "You no not have a gun! } else { execVM "HOLS.sqf" } Share this post Link to post Share on other sites
DarkDruid 96 Posted June 26, 2013 There is wrong variable after command handgunWeapon (at least I guess this isn't defined somewhere else?) and missing quote in your hint. Try this: action.sqf if (handgunWeapon player1 == "") then {hint "You no not have a gun!"} else {execVM "HOLS.sqf"} If it doesn't help, then check variable player1. It must be defined. Share this post Link to post Share on other sites