Ridiculous Amount of HELP! Requested

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.
Message
Author
User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#16 Post by PyTom »

Okay, there is basically an object, named persistent, which has as its fields the persistent values in the game. By default (and magically) every field on this object has the value None. If you set a value on a field, that value persistes though a number of games.

So one can write:

Code: Select all

$ persistent.got_ending_1 = True
to set a field, and something like:

Code: Select all

if persistent.got_ending_1 and persistent.got_ending_2:
    # code
to check the contents of fields.

Hope this helps.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

StealthGuardian
Newbie
Posts: 1
Joined: Wed Jul 13, 2005 12:23 pm
Contact:

#17 Post by StealthGuardian »

Ok, I feel dumb asking this but I'm having problems. I know how to program fairly well, but for some reason I can't get a basic program to work with this.

Here's the error:
I'm sorry, but an exception occured while executing your Ren'Py
script.

ScriptError: could not find label 'start'.

The last script statement executed was on line 54 of common/mainmenu.rpy.

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

File "console.py", line 69, in main
File "renpy\main.pyc", line 169, in main
File "renpy\main.pyc", line 132, in run
File "renpy\execution.pyc", line 78, in run
File "renpy\script.pyc", line 183, in lookup
ScriptError: could not find label 'start'.

The last script statement executed was on line 54 of common/mainmenu.rpy.

Ren'Py Version: Ren'Py 4.8.9


IF you need my script, just ask for it.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#18 Post by PyTom »

Ren'Py looks for a label named start, and starts running the game from there. So before the first line in your script that should be run (not including init blocks), you need to put:

Code: Select all

label start:

"This is the first line of the script."
Oh, and welcome to the forum.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Guest

#19 Post by Guest »

Thanks for welcoming me to the forums. I'm still having problems though. This is what I've got:


init:
# Basic configuration.
$ config.screen_width = 800
$ config.screen_height = 600
$ config.window_title = 'Summer's Dream'
$ config.window_icon = 'icon32.png'


# File picker entry.
$ style.file_picker_entry.background = Frame('saveslot.png', 16, 16)
$ style.file_picker_entry.xpadding = 2
$ style.file_picker_entry.ypadding = 2

# Main menu window.
$ style.mm_menu_window.background = Frame('saveslot.png', 16, 16)
$ style.mm_menu_window.xpadding = 20
$ style.mm_menu_window.ypadding = 20
$ style.mm_menu_window.xpos = 0.5
$ style.mm_menu_window.xanchor = 'center'
$ style.mm_menu_window.ypos = 0.5
$ style.mm_menu_window.yanchor = 'top'

# Game menu window.
$ style.gm_nav_window.background = Frame('saveslot.png', 16, 16)
$ style.gm_nav_window.xpadding = 20
$ style.gm_nav_window.ypadding = 20
$ style.gm_nav_window.xpos = 0.5
$ style.gm_nav_window.xanchor = 'center'

# Colors of various labels.
$ style.yesno_label.color = (255, 255, 0, 255)
$ style.prefs_label.color = (255, 255, 0, 255)

# Windows
$ style.window.xmargin = 0
$ style.window.ymargin = 0
$ style.window.background = Frame('background.png', 16, 16)
$ style.window.xpadding = 10
$ style.window.ypadding = 5

# This indents the second line of text that has been said by a
# character. The goal is to push it past the opening quote (added
# when the Characters are defined), so it looks better.
$ style.say_dialogue.rest_indent = 9


# Transitions.
# $ fade = Fade(.5, 0, .5) # Fade to black and back.
$ dissolve = Dissolve(0.5)
$ slowdissolve = Dissolve(1.0)

label start:

$ renpy.music_start('Disengage-DwELL.mp3')


"Ah, finally, I get some relaxation. For the last three weeks straight,
I've done nothing but write for my romance novel."

"Unfortunately, these last two weeks were useless. For some reason, I
just couldn't get any emotion on paper."

"So now I'm going on a vacation to relax and hopefully get focused again.
My editor has paid for the whole thing. The hotel, food, the flight:
everything has been paid for."

"I've finally arrived. Scarlet City: Great food, awesome locations, and
well-known for romance. Now, where to start......."

menu menu_1:

"The Beach":
jump the_beach

"Downtown":
jump downtown

label the_beach:

"The beach is a great idea. I can relax and observe other people
for inspiration."

label downtown:

"Downtown is a pretty good start. I could figure out where the hotel
is and look around for a while."


I'm just trying to run a test on it, and I can't seem to get the program to work.

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

#20 Post by Megaman Z »

Guest (StealthGuardian?) wrote:Thanks for welcoming me to the forums. I'm still having problems though. This is what I've got:


init:
# Basic configuration.
$ config.screen_width = 800
$ config.screen_height = 600
$ config.window_title = 'Summer's Dream'
$ config.window_icon = 'icon32.png'


# File picker entry.
$ style.file_picker_entry.background = Frame('saveslot.png', 16, 16)
$ style.file_picker_entry.xpadding = 2
$ style.file_picker_entry.ypadding = 2

# Main menu window.
$ style.mm_menu_window.background = Frame('saveslot.png', 16, 16)
$ style.mm_menu_window.xpadding = 20
$ style.mm_menu_window.ypadding = 20
$ style.mm_menu_window.xpos = 0.5
$ style.mm_menu_window.xanchor = 'center'
$ style.mm_menu_window.ypos = 0.5
$ style.mm_menu_window.yanchor = 'top'

# Game menu window.
$ style.gm_nav_window.background = Frame('saveslot.png', 16, 16)
$ style.gm_nav_window.xpadding = 20
$ style.gm_nav_window.ypadding = 20
$ style.gm_nav_window.xpos = 0.5
$ style.gm_nav_window.xanchor = 'center'

# Colors of various labels.
$ style.yesno_label.color = (255, 255, 0, 255)
$ style.prefs_label.color = (255, 255, 0, 255)

# Windows
$ style.window.xmargin = 0
$ style.window.ymargin = 0
$ style.window.background = Frame('background.png', 16, 16)
$ style.window.xpadding = 10
$ style.window.ypadding = 5

# This indents the second line of text that has been said by a
# character. The goal is to push it past the opening quote (added
# when the Characters are defined), so it looks better.
$ style.say_dialogue.rest_indent = 9


# Transitions.
# $ fade = Fade(.5, 0, .5) # Fade to black and back.
$ dissolve = Dissolve(0.5)
$ slowdissolve = Dissolve(1.0)

label start:

$ renpy.music_start('Disengage-DwELL.mp3')


"Ah, finally, I get some relaxation. For the last three weeks straight,
I've done nothing but write for my romance novel."

"Unfortunately, these last two weeks were useless. For some reason, I
just couldn't get any emotion on paper."

"So now I'm going on a vacation to relax and hopefully get focused again.
My editor has paid for the whole thing. The hotel, food, the flight:
everything has been paid for."

"I've finally arrived. Scarlet City: Great food, awesome locations, and
well-known for romance. Now, where to start......."

menu menu_1:

"The Beach":
jump the_beach

"Downtown":
jump downtown

label the_beach:

"The beach is a great idea. I can relax and observe other people
for inspiration."

label downtown:

"Downtown is a pretty good start. I could figure out where the hotel
is and look around for a while."


I'm just trying to run a test on it, and I can't seem to get the program to work.
okay... three things:
A) don't feel embarrassed about not logging in. it happens to just about everybody... except maybe PyTom and Blue Lemma, but that's beside the point.

B) please put it in a code box (click "code" to start one, then click "/code" to end it) so that we can identify exactly where the script itself begins and ends and also check indents (see "C)").

C) every label (not counting init blocks) needs to have some indentation for the block itself. make sure you don't forget that.

if PyTom can't figure out what's wrong, then I'll start looking at this as well.
~Kitsune Zeta

ShiraiJunichi
Miko-Class Veteran
Posts: 651
Joined: Sat May 21, 2005 12:28 pm
Location: University of Utah
Contact:

#21 Post by ShiraiJunichi »

StealthGuardian wrote:$ config.window_title = 'Summer's Dream'
That looks like the culprit right there. The apostrophe on "Summer's" ends the string prematurely, and is what seems to be messing things up. What you can do is use

$ config.window_title = 'Summer\'s Dream'

instead.

Oh, and yeah, welcome to the forums ^_^

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#22 Post by PyTom »

That's a good fix for his second problem. His first problem (which we worked out over IM) was that the .rpy file was not in the game directory.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

#23 Post by Megaman Z »

PyTom wrote:...His first problem (which we worked out over IM) was that the .rpy file was not in the game directory.
nice thing to be reminded of... although it should've been obvious. (then again, I've missed things so obvious that people question my intelligence, vision, and other senses, so what am I saying?)
~Kitsune Zeta

TheOnlyOneKunobi
Regular
Posts: 36
Joined: Wed Jun 01, 2005 11:25 pm
Location: The Call is Coming From Inisde the House....... In England
Contact:

#24 Post by TheOnlyOneKunobi »

M'okay it's been ages since I logged in I know (went on holiday to Cornwall then picked up a world of warcraft habit thats been consuming me since i got home)
And as a up-date on my progress, my scanner has commited suicide. T_T

So no new resources can be imported and i can't work on my game without backgrounds and characters! So until thats sorted I can't make my Ren'Py game, on the other hand I have enough left over bits and pices (story and early images) to cobble together an Adrift engine game. So while I'm reasearching my new format there'll be another black out from me again but I promise the release will come first here as a ren'ai game and second as an adrift.

Also I won't give up on my Ren'Py game, I'm far too stubborn to give up on it! So keep watching this space......
"God and Buddah, if you really do exist please know ........................ YOU ARE BOTH MY ENEMY!"
- Excel Excel

Post Reply

Who is online

Users browsing this forum: Bing [Bot]