[0.16.x] Bob's Mods: Adjustable Inserters
Posted: Tue Dec 26, 2017 1:34 am
Getting an unknown key...
www.factorio.com
https://forums.factorio.com/
Thanks for the report.FallenPaladin wrote:just seen it and thought id say something...
Code: Select all
6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
__bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
I'm not sure what's causing that issue, line 394 is this:nickcombs wrote:I encountered another bug. It kicked me back to the menu.
Code: Select all
6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3) LuaGuiElement API call when LuaGuiElement was invalid. stack traceback: __bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
Code: Select all
if event.element.name == "bob_logistics_inserter_button"
I've managed to find reliable way to reproduce it.bobingabout wrote:I'm not sure what's causing that issue, line 394 is this:nickcombs wrote:I encountered another bug. It kicked me back to the menu.
Code: Select all
6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3) LuaGuiElement API call when LuaGuiElement was invalid. stack traceback: __bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
the issue there is.... if that is invalid, it means you're pressing a button that doesn't exist.Code: Select all
if event.element.name == "bob_logistics_inserter_button"
I could try and put extra checks in place, but that's not a situation that should be able to happen.
EDIT: Yeah, due to the way I spliced inserters and Logistics scripts together, a situation might happen that results in it continuing to check buttons after a GUI has been deleted, resulting in this crash.
to fix this I'm going to add in a check for if event.element.valid.
Does it still do it with inserters 0.16.3?orzelek wrote:I've managed to find reliable way to reproduce it.bobingabout wrote:I'm not sure what's causing that issue, line 394 is this:nickcombs wrote:I encountered another bug. It kicked me back to the menu.
Code: Select all
6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3) LuaGuiElement API call when LuaGuiElement was invalid. stack traceback: __bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
the issue there is.... if that is invalid, it means you're pressing a button that doesn't exist.Code: Select all
if event.element.name == "bob_logistics_inserter_button"
I could try and put extra checks in place, but that's not a situation that should be able to happen.
EDIT: Yeah, due to the way I spliced inserters and Logistics scripts together, a situation might happen that results in it continuing to check buttons after a GUI has been deleted, resulting in this crash.
to fix this I'm going to add in a check for if event.element.valid.
You need to open inserter game gui (to set filters for example) then without closing it open adjustement gui and try to change something in it. It will cause the message above every time. I'm still not sure if it's a base game issue or you would need to add the protection in mod.
According to dropbox and the mods.factorio website, they both report it to me as 0.16.3nickcombs wrote:the filename still says 0.16.2. I only mention because Factorio reads looks for the newer name on launch.
It doesn't crash now but it doesn't modify the inserter with what you click. And GUI closes after clicking on on option (offset change for example).bobingabout wrote:Does it still do it with inserters 0.16.3?orzelek wrote:I've managed to find reliable way to reproduce it.bobingabout wrote:I'm not sure what's causing that issue, line 394 is this:nickcombs wrote:I encountered another bug. It kicked me back to the menu.
Code: Select all
6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3) LuaGuiElement API call when LuaGuiElement was invalid. stack traceback: __bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
the issue there is.... if that is invalid, it means you're pressing a button that doesn't exist.Code: Select all
if event.element.name == "bob_logistics_inserter_button"
I could try and put extra checks in place, but that's not a situation that should be able to happen.
EDIT: Yeah, due to the way I spliced inserters and Logistics scripts together, a situation might happen that results in it continuing to check buttons after a GUI has been deleted, resulting in this crash.
to fix this I'm going to add in a check for if event.element.valid.
You need to open inserter game gui (to set filters for example) then without closing it open adjustement gui and try to change something in it. It will cause the message above every time. I'm still not sure if it's a base game issue or you would need to add the protection in mod.
Shift + N switchs tiles AND offset. though if you want to make a near inserter from standard, you do have to toggle through long near, long, xlong near, xlong then to near.orzelek wrote:Would you consider making separate shortcut that would switch inserter from far to near(only on offset)?
It's pretty frequently used action but it requires opening full ui to make one change. Current shift+N shortcut switches whole tiles not the offset only.
Thats the main reason for this request - since usually switching far/near is more useful then going through all ranges.bobingabout wrote:Shift + N switchs tiles AND offset. though if you want to make a near inserter from standard, you do have to toggle through long near, long, xlong near, xlong then to near.orzelek wrote:Would you consider making separate shortcut that would switch inserter from far to near(only on offset)?
It's pretty frequently used action but it requires opening full ui to make one change. Current shift+N shortcut switches whole tiles not the offset only.