[Solved] Error in shortcuts mod

Place to get help with not working mods / modding interface.
User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 799
Joined: Sun May 07, 2017 10:16 am
Contact:

[Solved] Error in shortcuts mod

Post by ickputzdirwech »

I try to maintain mods.factorio.com/mod/Shortcuts for 0.18. Part of it goes way beyond my skillset, but I like the challenge. This time however, I just can't figure it out.

The bug even seems to be an inheritance from the 0.17 version of the mod. The mod implements among other things shortcuts to disable nightvision, belt immunity equipment and personal laser defense. But when clicking on those shortcuts there is always the following error:

Code: Select all

Error while running event Shortcuts-ick::on_lua_shortcut (ID 34)
LuaEquipment API call when LuaEquipment was invalid.
stack traceback:
	[C]: in function 'take'
	__Shortcuts-ick__/control.lua:43: in function 'update_state'
	__Shortcuts-ick__/control.lua:372: in function <__Shortcuts-ick__/control.lua:362>
stack traceback:
	[C]: in ?
	[C]: in function 'take'
	__Shortcuts-ick__/control.lua:43: in function 'update_state'
	__Shortcuts-ick__/control.lua:372: in function <__Shortcuts-ick__/control.lua:362>
You can find my version of the mod here: mods.factorio.com/mod/Shortcuts-ick.

Any hint what might cause this bug would be appreciated.
Last edited by ickputzdirwech on Thu Aug 13, 2020 12:46 pm, edited 1 time in total.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 799
Joined: Sun May 07, 2017 10:16 am
Contact:

Re: Error in shortcuts mod

Post by ickputzdirwech »

Well it took me some hours of trial and error, learning quite a lot new stuff and it turns out it was a two line fix. I feel like it was quite an obvious mistake, but I don't thing I am qualified for such a judgement yet. :D
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Post Reply

Return to “Modding help”