Oliver Hope 261 Posted December 3, 2018 (edited) Hey maybe iv just done something silly here but ive done a bunch of testing and it seems to be a ylands bug In this code the item 2 should be despawned if it is of type smoke bomb however when running it i get an error saying the argument for despawn entity is wrong , it says the argument is non however i know that it is an entity . it wouldnt run if it wasnt the second despawn entity doesnt seam to give problems unless the programming is breaking because there was an error THIEVES_VS_SECURITY_V6.7.zip EDIT: I noticed that this is happening in other places where i am despawning items in a for each loop Edited December 7, 2018 by Oliver Hope_P1 Share this post Link to post Share on other sites
Rudy.cz 41 Posted December 4, 2018 Everything is correct in this script and the trigger Restock TZ worked for me. Is there a way to reproduce this? Note: Also I have noticed that you have 2 Triggers with same script, it is more effective to create one Custom instruction with same functionality in Global storage and call it from each trigger. Share this post Link to post Share on other sites
Oliver Hope 261 Posted December 4, 2018 2 hours ago, Rudy.cz said: Everything is correct in this script and the trigger Restock TZ worked for me. Is there a way to reproduce this? Note: Also I have noticed that you have 2 Triggers with same script, it is more effective to create one Custom instruction with same functionality in Global storage and call it from each trigger. It only seems to cause a problem when you don’t have a smoke bomb in your inventory, and yes I should make a global function ? Share this post Link to post Share on other sites
Oliver Hope 261 Posted December 6, 2018 (edited) On 12/4/2018 at 12:27 PM, Rudy.cz said: Everything is correct in this script and the trigger Restock TZ worked for me. Is there a way to reproduce this? Note: Also I have noticed that you have 2 Triggers with same script, it is more effective to create one Custom instruction with same functionality in Global storage and call it from each trigger. @Rudy.cz i recorded a video of the problem output_log_game.txt as you can see in the output log im having the same error in other places Edited December 6, 2018 by Oliver Hope_P1 Share this post Link to post Share on other sites
Houp 237 Posted December 7, 2018 Hi, problem is that you try to despawn same entity twice in one frame. First in Restock TZ and then in Smoke grenade throw Event listener. Edit: game should be able to handle this in better way. Just note that we do not think that currect behaviour is OK. Share this post Link to post Share on other sites
Oliver Hope 261 Posted December 7, 2018 (edited) 4 hours ago, Houp said: Hi, problem is that you try to despawn same entity twice in one frame. First in Restock TZ and then in Smoke grenade throw Event listener. Edit: game should be able to handle this in better way. Just note that we do not think that currect behaviour is OK. OHHHH! thanks so much that was silly of me ill try find a way to fix it and see if i was doing a similar thing in the other places i had the problem Edit: I just relized that the other place i had the problem is the same situation Edited December 7, 2018 by Oliver Hope_P1 Share this post Link to post Share on other sites