Jump to content
Sign in to follow this  
wld427

nuke script error

Recommended Posts

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×