quakergamer 0 Posted December 28, 2003 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
bn880 5 Posted December 28, 2003 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
quakergamer 0 Posted December 28, 2003 Thanks bn880, problem solved! Share this post Link to post Share on other sites