Jump to content
Sign in to follow this  
quakergamer

Array error

Recommended Posts

Hello I got this small script...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_CurrentWeapon = _this select 1

OPGWC_WeaponRockets = ["Rocket57x192", "Rocket57x64", "ZuniLauncher38"]

? typeOf _CurrentWeapon in OPGWC_WeaponRockets: goto "MissileFired"

And I get an error in-game : in# Type string, expected object. Anyone has an idea. BTW this script is runned by the fired eventhandler

Share this post


Link to post
Share on other sites

typof works on objects not strings. Weapon _X returns a string name of a weapon. You do not need the typeof there.

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  

×