The Blueprint Lab - Bud

by Likos

Enter your lab to design your blueprints.

Content
5 years ago
0.17
11
Blueprints

b Avatars

5 years ago

Posting error in both Mods.

The mod The Blueprint Lab - Bud caused a non-recoverable error.
Please report this error to the mod author.

Error while running event BlueprintLab_Bud17::on_gui_click (ID 1)
The mod Avatars caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Avatars::on_player_changed_surface (ID 51)
Avatars/control.lua:262: attempt to index field 'character' (a nil value)
stack traceback:
Avatars/control.lua:262: in function <Avatars/control.lua:256>
stack traceback:
BlueprintLab_Bud17/scripts/logic.lua:31: in function 'ToTheLab'
BlueprintLab_Bud17/scripts/logic.lua:12: in function 'OnLabButton'
BlueprintLab_Bud17/scripts/gui.lua:30: in function <BlueprintLab_Bud17/scripts/gui.lua:28>
stack traceback:
[C]: in function 'teleport'
BlueprintLab_Bud17/scripts/logic.lua:31: in function 'ToTheLab'
BlueprintLab_Bud17/scripts/logic.lua:12: in function 'OnLabButton'
BlueprintLab_Bud17/scripts/gui.lua:30: in function <BlueprintLab_Bud17/scripts/gui.lua:28>

5 years ago

I suspect it is necessary to add a check for the presence of a character in mod Avatars, since BlueprintLab change surfaces, and in the laboratory it destroy player's character, because of which an error occurs.

5 years ago

Avatars was updated, took care of the issue. :)

5 years ago

;-)

5 years ago
(updated 5 years ago)

I'm wondering if you should also look into the new LuaPlayer functions added in 0.17. If you make use of them it will "remove" all the extra player characters that stand around outside of the lab when a player logs off and and put them back when they log back on again.

Namely https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_controller and the 3 associate player functions https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.get_associated_characters

5 years ago

I will try to test this method

New response