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
Newbie
Posts: 18
Joined: Sat Apr 27, 2019 7:17 am
Contact:

menu problem

#1 Post by bambino358 » Fri Sep 13, 2019 12:30 pm

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

User avatar
rayminator
Veteran
Posts: 269
Joined: Fri Feb 09, 2018 12:05 am
Projects: Redoing games to fix spelling mistakes other companys that don't care
Location: Canada
Contact:

Re: menu problem

#2 Post by rayminator » Fri Sep 13, 2019 1:59 pm

it's working fine for me

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

bambino358
Newbie
Posts: 18
Joined: Sat Apr 27, 2019 7:17 am
Contact:

Re: menu problem

#3 Post by bambino358 » Fri Sep 13, 2019 2:15 pm

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

bambino358
Newbie
Posts: 18
Joined: Sat Apr 27, 2019 7:17 am
Contact:

Re: menu problem

#4 Post by bambino358 » Fri Sep 13, 2019 2:52 pm

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: 1299
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life, Coffea Beans
Github: namastaii
Skype: Discord: lunalucid#7684
Soundcloud: deadseed
itch: lunalucid
Location: USA
Contact:

Re: menu problem

#5 Post by namastaii » Fri Sep 13, 2019 5:37 pm

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: 694
Joined: Mon Jan 07, 2019 2:55 am
Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
Organization: Friendly Teachers series
itch: .......
Location: Philippines, Mindanao
Contact:

Re: menu problem

#6 Post by isobellesophia » Sat Sep 14, 2019 1:50 am

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..


Working on a talking simulation game for everyone, except children.

Maddox Everyday Talk!
Is my very very main project, not contain 13 below.

Main project here viewtopic.php?f=43&t=56564
Image

User avatar
Remix
Eileen-Class Veteran
Posts: 1311
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 » Sat Sep 14, 2019 4:28 am

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
Mad Scientist Todo List:
  • Finish Improved Event Handler
  • Implement DragonBones animation as a Creator Defined Container
  • Develop Cartoon Speech Bubble dialogue
  • Finish Bitmask collision and rebound vector system
  • Develop time based building mechanic
  • Others
  • *Find a superb artist and actually write a game*

Post Reply

Who is online

Users browsing this forum: Google [Bot]