Jump to content
Sign in to follow this  
justenzy

Error:" "

Recommended Posts

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

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×