Using Gooey’s button in my gui script’s on_input function:
function on_input(self, action_id, action)
local group = gooey.group("group1", function()
gooey.button("fire", action_id, action, function(button) end, fire_button)
gooey.button("ice", action_id, action, function(button) end, ice_button)
gooey.button("attack", action_id, action, attack_button)
end)
return group.consumed
end
I’m having an error:
ERROR:SCRIPT: /gooey/internal/core.lua:9: bad argument #2 to ‘pick_node’ (number expected, got nil)
stack traceback:
[C]: in function ‘pick_node’
/gooey/internal/core.lua:9: in function ‘handle_action’
/gooey/internal/core.lua:47: in function ‘clickable’
/gooey/internal/button.lua:31: in function ‘button’
/gooey/gooey.lua:80: in function ‘button’
/battle_gui/battle_gui.gui_script:43: in function ‘fn’
/gooey/gooey.lua:182: in function ‘group’
/battle_gui/battle_gui.gui_script:42: in function </battle_gui/battle_gui.gui_script:41> ← this is gooey.group
Why does this error appear? I thought it passes the good ‘action’ to the button, since it is all about action.x (number expected, got nil is about it), but now I’m confused. It doesn’t affect the functionality of the button, but I just don’t want to see this error in console.