wld427 1705 Posted November 1, 2008 Im using cheyanneAH64s nule scripts to initiate a bomb type nuclear weapon. unfortunately after adapting it i have a small issue\error message RPT message <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Error in expression <_MissileX = (_this select 4);> Error position: <select 4);> Error Zero divisor Error in expression <_missobj = nearestObject [Mirage2000N, _MissileX];> Error position: <nearestObject [Mirage2000N, _MissileX];> Error Type Any, expected Number section of script.... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#Loop _Mirage2000N = (_this select 0); _MissileX = (_this select 4); _missobj = nearestObject [Mirage2000N, _MissileX]; _missobjX = _missobj anybody got an idea where i screwed up? Share this post Link to post Share on other sites
UNN 0 Posted November 2, 2008 Quote[/b] ]Error Zero divisor That usualy means you don't have enough elements in your array, when using the select command. Add this line to your script to check the passed parameters: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Player SideChat Format ["_This %1",_This]; #Loop You should see an array via the sidechat, containing at least five elements, if all is working well. Share this post Link to post Share on other sites