Hi,
thanks for this great mod (I am using it a lot). Recently I installed also 'Remote view item transfer' mod (which is known for causing problems with other mods' GUIs) and I got one such problem too when opening linked chest (the vanilla one) in a remote view when player is on the same surface as the linked-container:
The mod Remote view item transfer (1.1.1) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event remote-view-item-transfer::on_gui_opened (ID 102)
The mod Linked Chest Channel Names (1.0.1) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event linked-chest-channel-names::on_gui_opened (ID 102)
Gui element with name linked_channel_main_frame already present in the parent element.
stack traceback:
[C]: in function 'add'
linked-chest-channel-names/glib.lua:95: in function 'add'
linked-chest-channel-names/control.lua:34: in function <linked-chest-channel-names/control.lua:24>
stack traceback:
[C]: in function 'newindex'
__remote-view-item-transfer/control.lua:137: in function <remote-view-item-transfer/control.lua:112>
Fortunately hotfix for this was very easy (by editing your code):
In your control.lua, in on_gui_opened event handler just before calling glib.add() to add linked_channel_main_frame I inserted a check if this frame is not already there and return from the handler if so:
if player.gui.relative.linked_channel_main_frame then
player.print("linked_channel_main_frame already exists")
return
end
Can you please look at it and fix it in the next version?
many thanks & regards
KUDr