The Blueprint Designer Lab


Enter your lab to design your blueprints. Minor quickfix suggested by 4M_Peri

Utilities
2 years ago
1.1
15.9K

b Error after exiting lab

1 year, 9 months ago

Hi!

To start with, I love this mod, thanks for making this!

If have had a weird issue in my latest save: I use the feature of keeping blueprints on the cursor while exiting the lab to carry them over the "real world". I have recently been run over by a train, then proceeded to load an autosave. Ever since then when exiting the lab with a blueprint on my cursor, the game crashes with the following error message:

"The mod The Blueprint Designer Lab (1.0.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event BlueprintLab_design::on_gui_click (ID 1)
LuaPlayer doesn't contain key clean_cursor.
stack traceback:
[C]: in function 'index'
__BlueprintLab_design
/scripts/logic.lua:130: in function 'ReturnBlueprintImport'
BlueprintLab_design/scripts/logic.lua:93: in function 'ToTheWorld'
BlueprintLab_design/scripts/logic.lua:9: in function 'OnLabButton'
BlueprintLab_design/scripts/gui.lua:46: in function <BlueprintLab_design/scripts/gui.lua:44>"

This is also not tied to the save game itself, it now happens everywhere, rendering that feature unusable. Restarting Factorio did not help either.

10 months ago

Sorry for the bump, but i encountered the same issue.

The code which throws the error is in scripts/logic.lua : line 130

The line would be:

if not player.clean_cursor then
player.surface.spill_item_stack(player.position, player.cursor_stack)
end

Here, i moved the command outside the if statement and removed the if end lines completely.
It has worked for me so far and didn't throw any other issues, hope that helps you as well!

New response