LuaEntity API error

Place to get help with not working mods / modding interface.
Turtle
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sat May 31, 2014 9:45 pm
Contact:

LuaEntity API error

Post by Turtle »

Hi all,

I've been using the Russian Logistics mod and it's been fine until recently. I'm randomly getting this error:

Code: Select all

Error while running the event handler:
__RussianLogistics__/control.lua:105: LuaEntity API call when LuaEntity was invalid.
Line: 105

Code: Select all

game.createentity{name = "item-on-ground", position = possiblePos, stack = {name = item.stack.name, count = item.stack.count}}
I removed a lot of the stuff because I only use two belts so I thought it was something I did. I put back the unchanged version and I'm still getting this error. Let me know if you need to see the whole function. Any help would be greatly appreciated!
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: LuaEntity API error

Post by L0771 »

https://forums.factorio.com/forum/vie ... =14&t=7970
Links don't work.

- possiblePos is invalid.
- item.stack doesn't exists
Turtle
Fast Inserter
Fast Inserter
Posts: 240
Joined: Sat May 31, 2014 9:45 pm
Contact:

Re: LuaEntity API error

Post by Turtle »

L0771 wrote:https://forums.factorio.com/forum/vie ... =14&t=7970
Links don't work.

- possiblePos is invalid.
- item.stack doesn't exists
Thanks for the reply. PossiblePos is valid:

Code: Select all

local possiblePos = game.findnoncollidingposition("item-on-ground", newPos, 0.01, 0.01)
I'll just post the whole function. The original code was game.tick, but it was taking up way too many resources so I delayed it a bit:
function
Post Reply

Return to “Modding help”