Skip to content

Crash when exiting lab with a blueprint in the cursor #5

@Blu3wolf

Description

@Blu3wolf

https://mods.factorio.com/mod/BlueprintLab_Blu3wolf/discussion/62ca9c37cf970132d4bf25bc?quote=1

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.

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions