D. Patterson 14 Posted October 24, 2017 So I'm trying to integrate TPW furniture into Ares Achilles So these are my three scripts. https://pastebin.com/w3xTfYVbhttps://pastebin.com/dKTenVBwhttps://pastebin.com/WXf6wnbk Here is a screencap of the error. 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
Sgt. Dennenboom 98 Posted October 24, 2017 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
D. Patterson 14 Posted October 25, 2017 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