PlannerCore

by bob809

Core for planner series of mods.

Utilities
3 years ago
0.16 - 0.18
319

b Error in PlanerCore when using OutpostPlanner 0.18.27

3 years ago

I received this from OutpostPlanner on v0.8.27 upon lacing the outpost blueprint.

I'm not really sure what else to put here

Error while running event PlannerCore::on_tick (ID 0)
on_built_entity (ID 6) (6) can't be raised through script.
stack traceback:
PlannerCore/OB_helper.lua:171: in function <PlannerCore/OB_helper.lua:124>
(...tail calls...)
PlannerCore/OB_stages.lua:174: in function '?'
PlannerCore/OB_stages.lua:291: in function 'stage_function'
PlannerCore/planner-core.lua:32: in function 'placement_tick'
PlannerCore/planner-core.lua:123: in function <PlannerCore/planner-core.lua:105>
stack traceback:
[C]: in function 'raise_event'
PlannerCore/OB_helper.lua:171: in function <PlannerCore/OB_helper.lua:124>
(...tail calls...)
PlannerCore/OB_stages.lua:174: in function '?'
PlannerCore/OB_stages.lua:291: in function 'stage_function'
PlannerCore/planner-core.lua:32: in function 'placement_tick'
PlannerCore/planner-core.lua:123: in function <PlannerCore/planner-core.lua:105>

3 years ago

I got the same error message, while using the OP mod.
Hope you can fix that asap, cause I love the mod :)
My error message:
Error while running event PlannerCore::on_tick (ID 0)
on_built_entity (ID 6) (6) can't be raised through script.
stack traceback:
PlannerCore/OB_helper.lua:171: in function <PlannerCore/OB_helper.lua:124>
(...tail calls...)
PlannerCore/OB_stages.lua:174: in function '?'
PlannerCore/OB_stages.lua:291: in function 'stage_function'
PlannerCore/planner-core.lua:32: in function 'placement_tick'
PlannerCore/planner-core.lua:123: in function <PlannerCore/planner-core.lua:105>
stack traceback:
[C]: in function 'raise_event'
PlannerCore/OB_helper.lua:171: in function <PlannerCore/OB_helper.lua:124>
(...tail calls...)
PlannerCore/OB_stages.lua:174: in function '?'
PlannerCore/OB_stages.lua:291: in function 'stage_function'
PlannerCore/planner-core.lua:32: in function 'placement_tick'
PlannerCore/planner-core.lua:123: in function <PlannerCore/planner-core.lua:105>

3 years ago

Same error here..now it seems need to put miners by hand.. ugghh :-)

3 years ago
(updated 3 years ago)

So a "fix" here is to remove the "script.raise_event" call at lines 171-177 in OB_helper.lua. I'm not sure what implications this has, but it seems to at least allow me to build outposts. I'm guessing the actual fix should be rather simple (script.raise_event(defines.event.on_built_entity, ...) needs to be replaced with script.raise_on_built(...)) but my Lua is rusty and I don't have time to dig through the Factorio API.

Hopefully this can hold us over until a proper fix is made :)

3 years ago

Fixed in 0.2.3. What @XtremeCheese said, the events have changed in recent Factorio versions, mods have to use script_raised_built now

3 years ago

Thanks for the official fix @bob809!

New response