Jump to content

factory.lua - error constructing Entity (with possible fix)


Rinart73

Recommended Posts

2018-10-31 10-08-00| error constructing Entity: Entity with index "7242ff47-b7a8-43ab-822b-9c3cb9e26635" doesn't exist at 
2018-10-31 10-08-00| stack traceback:
2018-10-31 10-08-00|     [C]:-1: in function Entity
2018-10-31 10-08-00|     data/scripts/entity/merchants/factory.lua:1306: in function updateDeliveryShuttleStarts
2018-10-31 10-08-00|     data/scripts/entity/merchants/factory.lua:1102: in function ?
2018-10-31 10-08-00| 

 

So I think the reason why this error happens is because you're trying to construct an deleted entity instead of trying to search it in a sector:

So replacing this:

local station = Entity(id)

with this should help:

local station = Sector():getEntity(Uuid(id))

 

The same should be done on lines: 902, 919, 1241, 1254, 1396

 

UPD: I think this has been reported already in this thread.

 

UPD: Fixed the code

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...