I’m trying to use Gooey library for my game. Everything going well when in main menu. But i got this error when i use it in battle stage.
ERROR:SCRIPT: /gooey/internal/core.lua:87: attempt to call global ‘type’ (a number value)
stack traceback:
/gooey/internal/core.lua:87: in function ‘to_hash’
/gooey/internal/button.lua:18: in function ‘button’
/gooey/gooey.lua:71: in function ‘button’
/main/scripts/gui/battle.gui_script:377: in function ‘fn’
/gooey/gooey.lua:165: in function ‘group’
/main/scripts/gui/battle.gui_script:376: in function </main/scripts/gui/battle.gui_script:369>
My code for initialize the button :
local gooey = require "gooey.themes.kenneyblue.kenneyblue"
function on_input(self, action_id, action)
if not self.game_paused then
return true
end
if action_id == hash("touch") and action.pressed then
sound.play("#mouse_click")
end
gooey.button("restart_button",action_id, action, function(button)
if self.game_finish or self.game_paused then
msg.post("default:/battle_gui", "hide")
sound.stop("#vic")
msg.post("default:/arena", "restart_game")
end
end
end
Anyone know how to fix it ?