Jump to content
Sign in to follow this  
D. Patterson

Trying to integrate TPW Furniture into an Ares Achilles Module, getting error zero divisor.

Recommended Posts

So I'm trying to integrate TPW furniture into Ares Achilles So these are my three scripts.

https://pastebin.com/w3xTfYVb
https://pastebin.com/dKTenVBw
https://pastebin.com/WXf6wnbk

Here is a screencap of the error.
t3rxvi5.png  

 

When the script is run, spawning the furniture works great, without errors.  But when it comes to deleting when multiple houses are involved, the furniture will be removed partially, but then throw this error and it ceases the deletion.  

I can keep running the script and a little more furniture will be deleted each time, until eventually it reaches a point where _bld becomes undefined, but some furniture still exists.  

  

Edit: So I seemed to narrow down the issue to the tpw_spawned array, which will occasionally have a null object in it. However I can't seem to figure out how to get rid of it.

Share this post


Link to post
Share on other sites

You use deleteAt, which shortens the array immidiatly. Since the count isn't updated each iteration, _i will eventually be larger than the actual size of the array (which gets smaller every iteration).

Share this post


Link to post
Share on other sites
8 hours ago, Sgt. Dennenboom said:

You use deleteAt, which shortens the array immidiatly. Since the count isn't updated each iteration, _i will eventually be larger than the actual size of the array (which gets smaller every iteration).

  

So is there a way to get around this and update the count?  

  

Edit: This seems to work.  

https://pastebin.com/NFmpuKA5

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  

×