menu problem

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
bambino358
Regular
Posts: 26
Joined: Sat Apr 27, 2019 7:17 am
Contact:

menu problem

#1 Post by bambino358 »

In Ren'Py 7.0.0 everything works fine. When I run the game with Ren'py 7.3.2 it doesn't work...

Code: Select all

menu menuzacatekzlataky:
        "Do you wanna add some gold?(If you wanna enjoy the game to the maximum, start with 0 gold.)"
        "-start with 0 gold-":
            "Great decision. This is how the game should be played."
            $ zlataky = 0
        "-start with 1000 gold-":
            "Cheat mode activated."
            $ zlataky = 1000
```
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 323, in script
menu menuzacatekzlataky():
Exception: Unknown keyword arguments: items

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "game/script.rpy", line 323, in script
menu menuzacatekzlataky():
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\ast.py", line 1626, in execute
choice = renpy.exports.menu(choices, self.set, args, kwargs, item_arguments)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\exports.py", line 983, in menu
rv = renpy.store.menu(new_items)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\exports.py", line 1217, in display_menu
rv = renpy.ui.interact(mouse='menu', type=type, roll_forward=roll_forward)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\ui.py", line 295, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\core.py", line 2699, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\core.py", line 3091, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\screen.py", line 430, in visit_all
callback(self)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\core.py", line 3091, in <lambda>
root_widget.visit_all(lambda i : i.per_interact())
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\screen.py", line 440, in per_interact
self.update()
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\display\screen.py", line 625, in update
self.screen.function(**self.scope)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\ast.py", line 158, in apply_arguments
return parameters.apply(args, kwargs, ignore_errors)
File "C:\Users\Milan\Desktop\renpy-7.3.2-sdk\renpy\ast.py", line 145, in apply
raise Exception("Unknown keyword arguments: %s" % ( ", ".join(values.keys())))
Exception: Unknown keyword arguments: items

Windows-8-6.2.9200
Ren'Py 7.3.2.320
City of slaves 1.0
Fri Sep 13 18:28:18 2019
```
I have no idea what is wrong with the menu...

Thank you

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: menu problem

#2 Post by rayminator »

it's working fine for me

have you added anything before or after the menu that might be causing that error?

bambino358
Regular
Posts: 26
Joined: Sat Apr 27, 2019 7:17 am
Contact:

Re: menu problem

#3 Post by bambino358 »

No, I just copy/paste to the new renpy folder.

bambino358
Regular
Posts: 26
Joined: Sat Apr 27, 2019 7:17 am
Contact:

Re: menu problem

#4 Post by bambino358 »

Ok doesn't matter. I'll publish the game in older version of renpy where everything works fine.

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: menu problem

#5 Post by namastaii »

The error isn't associated with the menu, it's talking about your code:

Code: Select all

%s" % ( ", ".join(values.keys())))
what is the whole code there?

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: menu problem

#6 Post by isobellesophia »

Code: Select all

menu menuzacatekzlataky: 
     "Do you wanna add some gold?(If you wanna enjoy the game to the maximum, start with 0 gold.)" 
     "-start with 0 gold-": 
         "Great decision. This is how the game should be played." 
         $ zlataky = 0 
     "-start with 1000 gold-": 
         "Cheat mode activated." 
         $ zlataky = 1000
will be

Code: Select all

menu: 
     "Do you wanna add some gold?(If you wanna enjoy the game to the maximum, start with 0 gold.)" 
     "-start with 0 gold-": 
         "Great decision. This is how the game should be played." 
         $ zlataky = 0 
     "-start with 1000 gold-": 
         "Cheat mode activated." 
         $ zlataky = 1000
Most likely it should be menu instead, maybe that is what you were talking about.
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: menu problem

#7 Post by Remix »

The error points at different syntax than you have shown in your example


... line 323, in script
menu menuzacatekzlataky():


Note the () ... You certainly do Not want that.
If your .rpy actually names the menu without using () I would suggest a Force Recompile in the Launcher
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: No registered users