Gooey bad argument #2 to 'pick_node' (number expected, got nil)

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.

Which version of Gooey are you using?

When does it happen? Immediately as you move the mouse or perhaps when you click? Is the third button line not supposed to have a click handler function like the others?

It’s in the dependencies, so I’m guessing it takes the most actual release (6.3.0 for now).
It happens when clicked (pressed) on the gui button.
It doesn’t matter which gooey.button I’m using (I tried to deactivate each of them and activate only one), and yes, the third button isn’t using optional 5th argument, but reacts only when pressed and released cycle is done. Fire and ice buttons are working from the beginning of the ‘pressed’ to release of the button so the user is able to click and hold the button to release a magical element)

I think I found the answer. But it wasn’t recognisable from that log - I created at first a group of buttons for menu and then I’ve consumed it. When I’m not consuming the group in menu, the error isn’t appearing.

If you can, please zip your project and share it with me (bjorn.ritzl@king.com). I’d love to figure out what’s wrong and perhaps see if there’s a bug in the library.

PS You should use a dependency to a fixed version to avoid breaking changes.