Main Menu Buttons

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
User avatar
DragonaTalon127
Newbie
Posts: 15
Joined: Mon Jun 11, 2012 7:30 pm
Contact:

Main Menu Buttons

#1 Post by DragonaTalon127 »

It seems once again I have hit a wall. This is the problem. I've been trying to edit the main menu to use my buttons as the main menu buttons. I've been working at it for a while and it's showing the error that the syntax is invalid. I've looked on many forums here and they all say this code that I used I even copied and pasted so it would be in right. If someone could please tell me what I'm doing wrong I'd greatly appreciate it.
Attachments
problem.png
problem2.png

User avatar
bunbun
Regular
Posts: 140
Joined: Mon Jun 11, 2012 10:54 pm
Contact:

Re: Main Menu Buttons

#2 Post by bunbun »

I'm not very good at programming but I'll try to help ;;;
did you mistaken " as '?
try replacing all the ' as " example ground "mm_bg2.png" instead of 'mm_bg2.png'
WIPS
Image

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Main Menu Buttons

#3 Post by SundownKid »

Are you sure you put that in the screens script? You need to replace the main menu, not add one in the options script.

apricotorange
Veteran
Posts: 479
Joined: Tue Jun 05, 2012 2:01 am
Contact:

Re: Main Menu Buttons

#4 Post by apricotorange »

What version of Ren'Py are you using? If you aren't using the latest version (6.13.12), please try it.

Edit: Err, wait, I just realized how you could get that error: make sure there aren't any spaces/tabs before the keyword "screen".

User avatar
DragonaTalon127
Newbie
Posts: 15
Joined: Mon Jun 11, 2012 7:30 pm
Contact:

Re: Main Menu Buttons

#5 Post by DragonaTalon127 »

@bunbun I replaced all the ' as " like you said. When I found the code on the forum they were all ' even though I thought it was supposed to be " but decided not to mess with the code since that's how it was posted.

@apricotorange Yes, I'm using the latest version. I just fixed the spaces behind screen and now its showing the main menu screen but still showing the default buttons instead of the ones I created.

@Sundownkid I didn't put it in the screens script. -_-' So I should go to the screen tab and replace the screen menu there?

User avatar
lein
Newbie
Posts: 13
Joined: Sat Jul 26, 2008 1:06 am
Contact:

Re: Main Menu Buttons

#6 Post by lein »

It actually works wherever you put the screen code in any .rpy files... but you may want to put it in together with screen script so it'll be easier to manage your customized configurations, cmiiw -_-
screen main_menu itself actually already exists in the screen script, so it might be the reason why the default main menu appears instead of your modified one.

try to replacing the old one into your modified codes... hope this help - -)a

since Im also newbie at using renpy so i dont know much... hope im not wrong -_-
My artworks on deviantART.
Now also opening commission! *shameless promotion mode on


I wish I could start off my own VN thread ASAP ._.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Main Menu Buttons

#7 Post by nyaatrap »

Code: Select all

init 1:
    screen
higher number of init blocks will overwrite the old one (screens are defined on the init -500 blocks in default), or just define the newest at the bottom of the script.

User avatar
DragonaTalon127
Newbie
Posts: 15
Joined: Mon Jun 11, 2012 7:30 pm
Contact:

Re: Main Menu Buttons

#8 Post by DragonaTalon127 »

Thanks so much for the help everyone! I was able to fix the error and it's doing what I want :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]