Jump to content
Oliver Hope

Incorrect error with despawn entity [Solved]

Recommended Posts

Hey 

maybe iv just done something silly here but ive done a bunch of testing and it seems to be a ylands bug 

Ylands_181203_210324.thumb.png.193ba41c9cd863252feab7aea306e7fa.png

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 by Oliver Hope_P1

Share this post


Link to post
Share on other sites

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
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
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 by Oliver Hope_P1

Share this post


Link to post
Share on other sites

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
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 by Oliver Hope_P1

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

×