Hi there.
I'm trying to make a custom game menu with imagebuttons, following that tutorial I found here:
More or less, everything works correctly, but when I try to make the Save/Load/Preferences button go where they should, an error appears:
The code looks like that:
As I say, now pushing the right mouse button, the screen shows every
image as it should, and the custom actions ("jump inventory", and that
kind of things) work without problem, but when I click any of these
three buttons, the next error pops:
I'm sorry, but an uncaught exception occurred.
While running game code:
Any advice about what can be the cause, and how can I solve it?
Thank you very much.
Things I've tried and still give error:
(no brackets)
Yes, some of them, I've actually tried to improvise, seeing that nothing I found worked. Also, I've tried any combination of them (i.e. action Show('preferences'), for example)
I'm trying to make a custom game menu with imagebuttons, following that tutorial I found here:
You must be registered to see the links
More or less, everything works correctly, but when I try to make the Save/Load/Preferences button go where they should, an error appears:
The code looks like that:
Code:
$ _game_menu_screen = "game_menu"
screen game_menu():
tag menu
add "images/background.png" xalign 0 yalign 0
zorder 102
imagebutton:
focus_mask True
idle Transform("images/Preferences.png")
hover Transform("images/Preferences Hover.png")
action [ShowMenu("preferences")]
imagebutton:
focus_mask True
idle Transform("images/Save.png")
hover Transform("images/Save Hover.png")
action [ShowMenu("save")]
imagebutton:
focus_mask True
idle Transform("images/Load.png")
hover Transform("images/Load Hover.png")
action [ShowMenu("load")]
image as it should, and the custom actions ("jump inventory", and that
kind of things) work without problem, but when I click any of these
three buttons, the next error pops:
I'm sorry, but an uncaught exception occurred.
While running game code:
Code:
File "renpy/common/00gamemenu.rpy", line 173, in script
$ ui.interact()
File "renpy/common/00gamemenu.rpy", line 173, in <module>
$ ui.interact()
File "game/screens.rpy", line 716, in execute
screen preferences():
File "game/screens.rpy", line 716, in execute
screen preferences():
File "game/screens.rpy", line 720, in execute
use game_menu(_("Preferences"), scroll="viewport"):
Exception: Too many arguments in call (expected 0, got 1).
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "renpy/common/00gamemenu.rpy", line 173, in script
$ ui.interact()
File "C:\path\renpy-7.1.3-sdk\renpy\ast.py", line 881, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\path\renpy-7.1.3-sdk\renpy\python.py", line 1913, in py_exec_bytecode
exec bytecode in globals, locals
File "renpy/common/00gamemenu.rpy", line 173, in <module>
$ ui.interact()
File "C:\path\renpy-7.1.3-sdk\renpy\ui.py", line 289, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\path\renpy-7.1.3-sdk\renpy\display\core.py", line 2672, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "C:\path\renpy-7.1.3-sdk\renpy\display\core.py", line 3059, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "C:\path\renpy-7.1.3-sdk\renpy\display\core.py", line 531, in visit_all
d.visit_all(callback, seen)
File "C:\path\renpy-7.1.3-sdk\renpy\display\core.py", line 531, in visit_all
d.visit_all(callback, seen)
File "C:\path\renpy-7.1.3-sdk\renpy\display\core.py", line 531, in visit_all
d.visit_all(callback, seen)
File "C:\path\renpy-7.1.3-sdk\renpy\display\core.py", line 531, in visit_all
d.visit_all(callback, seen)
File "C:\path\renpy-7.1.3-sdk\renpy\display\screen.py", line 424, in visit_all
callback(self)
File "C:\path\renpy-7.1.3-sdk\renpy\display\core.py", line 3059, in <lambda>
root_widget.visit_all(lambda i : i.per_interact())
File "C:\path\renpy-7.1.3-sdk\renpy\display\screen.py", line 434, in per_interact
self.update()
File "C:\path\renpy-7.1.3-sdk\renpy\display\screen.py", line 619, in update
self.screen.function(**self.scope)
File "game/screens.rpy", line 716, in execute
screen preferences():
File "game/screens.rpy", line 716, in execute
screen preferences():
File "game/screens.rpy", line 720, in execute
use game_menu(_("Preferences"), scroll="viewport"):
File "C:\path\renpy-7.1.3-sdk\renpy\ast.py", line 136, in apply
raise Exception("Too many arguments in call (expected %d, got %d)." % (len(self.positional), len(args)))
Exception: Too many arguments in call (expected 0, got 1).
Windows-8-6.2.9200
Ren'Py 7.1.3.1092
Hola soy una puerta 1.0
Thu Jun 20 20:56:47 2019
Thank you very much.
Things I've tried and still give error:
Code:
screen game_menu:
Code:
action ShowMenu("preferences")
action [ShowMenu('preferences')]
action [Show("preferences")]
action [ShowMenu("preferences_screen")]
action [Jump("preferences")]
action [Scene("preferences")]
action [Screen("preferences")]