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.
-
Ladythief1997
- Regular
- Posts: 44
- Joined: Tue Mar 08, 2016 6:09 pm
- Projects: Unnamed PJ
- Tumblr: genderbender1lover
- Deviantart: genderbender-lover
- Skype: mycandyloveobsession@gmail.com
- Soundcloud: Breaking~Point
- Location: Ildis
-
Contact:
#1
Post
by Ladythief1997 » Sun Mar 27, 2016 12:02 am
So this error pops up...
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 112: invalid syntax
$ day = 0
^
Ren'Py Version: Ren'Py 6.99.7.858
for this coding but I dont know what syntax is supposed to go there. Any idea people?
Code: Select all
init python:
register_stat("Strength", "strength", 10, 100)
register_stat("Intelligence", "intelligence", 10, 100)
dp_period("Morning", "morning_act")
dp_choice("Attend Class", "class")
dp_choice("Cut Class", "cut")
# This is an example of an event that should only show up under special circumstances
dp_choice("Fly to the Moon", "fly", show="strength >= 100 and intelligence >= 100")
dp_period("Afternoon", "afternoon_act")
dp_choice("Study", "study")
dp_choice("Hang Out", "hang")
dp_period("Evening", "evening_act")
dp_choice("Exercise", "exercise")
dp_choice("Play Games", "play")
# This is the entry point into the game.
# Initialize the default values of some of the variables used in
# the game.
$ day = 0
# Show a default background.
scene black
# The script here is run before any event.
"In case you're just tuning in, here's the story of my life to
date."
"I'm a guy in the second year of high school."
"I'm not good at sports or school or even something as simple as
remembering peoples names."
"In short, I am your usual random loser guy."
"And this is my story..."
# We jump to day to start the first day.
jump day
# This is the label that is jumped to at the start of a day.
label day:
# Increment the day it is.
$ day += 1
# We may also want to compute the name for the day here, but
# right now we don't bother.
"It's day %(day)d."
# Here, we want to set up some of the default values for the
# day planner. In a more complicated game, we would probably
# want to add and remove choices from the dp_ variables
# (especially dp_period_acts) to reflect the choices the
# user has available.
$ morning_act = None
$ afternoon_act = None
$ evening_act = None
$ narrator("What should I do today?", interact=False)
# Now, we call the day planner, which may set the act variables
# to new values. We call it with a list of periods that we want
# to compute the values for.
call screen day_planner(["Morning", "Afternoon", "Evening"])
# We process each of the three periods of the day, in turn.
label morning:
# Tell the user what period it is.
centered "Morning"
# Set these variables to appropriate values, so they can be
# picked up by the expression in the various events defined below.
$ period = "morning"
$ act = morning_act
# Execute the events for the morning.
call events_run_period
# That's it for the morning, so we fall through to the
# afternoon.
label afternoon:
# It's possible that we will be skipping the afternoon, if one
# of the events in the morning jumped to skip_next_period. If
# so, we should skip the afternoon.
if check_skip_period():
jump evening
# The rest of this is the same as for the morning.
centered "Afternoon"
$ period = "afternoon"
$ act = afternoon_act
call events_run_period
label evening:
# The evening is the same as the afternoon.
if check_skip_period():
jump night
centered "Evening"
$ period = "evening"
$ act = evening_act
call events_run_period
label night:
# This is now the end of the day, and not a period in which
# events can be run. We put some boilerplate end-of-day text
# in here.
centered "Night"
"It's getting late, so I decide to go to sleep."
# We call events_end_day to let it know that the day is done.
call events_end_day
# And we jump back to day to start the next day. This goes
# on forever, until an event ends the game.
jump day
# This is a callback that is called by the day planner.
label dp_callback:
# Add in a line of dialogue asking the question that's on
# everybody's mind.
$ narrator("What should I do today?", interact=False)
Writer looking for EXP go ahead and hit me up. ;D You know you want to.
-
trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
-
Contact:
#2
Post
by trooper6 » Sun Mar 27, 2016 1:26 am
You are missing the "label start"
It should look a bit more like this:
Code: Select all
# This is the entry point into the game.
label start:
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe:
http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
-
Ladythief1997
- Regular
- Posts: 44
- Joined: Tue Mar 08, 2016 6:09 pm
- Projects: Unnamed PJ
- Tumblr: genderbender1lover
- Deviantart: genderbender-lover
- Skype: mycandyloveobsession@gmail.com
- Soundcloud: Breaking~Point
- Location: Ildis
-
Contact:
#3
Post
by Ladythief1997 » Sun Mar 27, 2016 2:26 am
The same error still popped up.
Writer looking for EXP go ahead and hit me up. ;D You know you want to.
-
Nylan
- Regular
- Posts: 47
- Joined: Tue Mar 08, 2016 4:11 am
- Completed: Segmentation_Fault (Nano16)
- Projects: Currently free
- Organization: MagicEngineering
-
Contact:
#4
Post
by Nylan » Sun Mar 27, 2016 3:53 am
You'll need to close out of the game and re-launch (or reload) it for the change to take effect. Also make sure the start label has no leading spaces and is placed where trooper6 mentioned (under "# This is the entry point into the game.")
-
Ladythief1997
- Regular
- Posts: 44
- Joined: Tue Mar 08, 2016 6:09 pm
- Projects: Unnamed PJ
- Tumblr: genderbender1lover
- Deviantart: genderbender-lover
- Skype: mycandyloveobsession@gmail.com
- Soundcloud: Breaking~Point
- Location: Ildis
-
Contact:
#5
Post
by Ladythief1997 » Sun Mar 27, 2016 9:56 pm
Its still showing up the same error
Writer looking for EXP go ahead and hit me up. ;D You know you want to.
-
Ladythief1997
- Regular
- Posts: 44
- Joined: Tue Mar 08, 2016 6:09 pm
- Projects: Unnamed PJ
- Tumblr: genderbender1lover
- Deviantart: genderbender-lover
- Skype: mycandyloveobsession@gmail.com
- Soundcloud: Breaking~Point
- Location: Ildis
-
Contact:
#6
Post
by Ladythief1997 » Mon Mar 28, 2016 2:27 am
Code: Select all
# You can place the script of your game in this file.
# can integrate with a new version of DSE when it comes out.
init python:
define register_stat $ ("Strength", "strength", 10, 100)
define register_stat $ ("Intelligence", "intelligence", 10, 100)
dp_period("Morning", "morning_act")
dp_choice("Attend Class", "class")
dp_choice("Cut Class", "cut")
# This is an example of an event that should only show up under special circumstances
dp_choice("Fly to the Moon", "fly", show="strength >= 100 and intelligence >= 100")
dp_period("Afternoon", "afternoon_act")
dp_choice("Study", "study")
dp_choice("Hang Out", "hang")
dp_period("Evening", "evening_act")
dp_choice("Exercise", "exercise")
dp_choice("Play Games", "play")
# Declare images below this line, using the image statement.
# The game starts here.
label start:
# Initialize the default values of some of the variables used in
# the game.
$ day = 0
# Show a default background.
scene black
# The script here is run before any event.
"In case you're just tuning in, here's the story of my life to
date."
"I'm a guy in the second year of high school."
"I'm not good at sports or school or even something as simple as
remembering peoples names."
"In short, I am your usual random loser guy."
"And this is my story..."
# We jump to day to start the first day.
jump day
# This is the label that is jumped to at the start of a day.
label day:
# Increment the day it is.
$ day += 1
# We may also want to compute the name for the day here, but
# right now we don't bother.
"It's day %(day)d."
# Here, we want to set up some of the default values for the
# day planner. In a more complicated game, we would probably
# want to add and remove choices from the dp_ variables
# (especially dp_period_acts) to reflect the choices the
# user has available.
$ morning_act = None
$ afternoon_act = None
$ evening_act = None
$ narrator("What should I do today?", interact=False)
# Now, we call the day planner, which may set the act variables
# to new values. We call it with a list of periods that we want
# to compute the values for.
call screen day_planner(["Morning", "Afternoon", "Evening"])
# We process each of the three periods of the day, in turn.
label morning:
# Tell the user what period it is.
centered "Morning"
# Set these variables to appropriate values, so they can be
# picked up by the expression in the various events defined below.
$ period = "morning"
$ act = morning_act
# Execute the events for the morning.
call events_run_period
# That's it for the morning, so we fall through to the
# afternoon.
label afternoon:
# It's possible that we will be skipping the afternoon, if one
# of the events in the morning jumped to skip_next_period. If
# so, we should skip the afternoon.
if check_skip_period():
jump evening
# The rest of this is the same as for the morning.
centered "Afternoon"
$ period = "afternoon"
$ act = afternoon_act
call events_run_period
label evening:
# The evening is the same as the afternoon.
if check_skip_period():
jump night
centered "Evening"
$ period = "evening"
$ act = evening_act
call events_run_period
label night:
# This is now the end of the day, and not a period in which
# events can be run. We put some boilerplate end-of-day text
# in here.
centered "Night"
"It's getting late, so I decide to go to sleep."
# We call events_end_day to let it know that the day is done.
call events_end_day
# And we jump back to day to start the next day. This goes
# on forever, until an event ends the game.
jump day
# This is a callback that is called by the day planner.
label dp_callback:
# Add in a line of dialogue asking the question that's on
# everybody's mind.
$ narrator("What should I do today?", interact=False)
return
So that is the entire script as of now and this is what I am getting right now.
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 4: invalid syntax
define register_stat $ ("Strength", "strength", 10, 100)
^
Ren'Py Version: Ren'Py 6.99.7.858
Writer looking for EXP go ahead and hit me up. ;D You know you want to.
-
Nylan
- Regular
- Posts: 47
- Joined: Tue Mar 08, 2016 4:11 am
- Completed: Segmentation_Fault (Nano16)
- Projects: Currently free
- Organization: MagicEngineering
-
Contact:
#7
Post
by Nylan » Mon Mar 28, 2016 10:56 am
This is a new error. Look at your code. What's the difference between the line shown in the error message you posted in this most recent script.py vs the first one?
-
Ladythief1997
- Regular
- Posts: 44
- Joined: Tue Mar 08, 2016 6:09 pm
- Projects: Unnamed PJ
- Tumblr: genderbender1lover
- Deviantart: genderbender-lover
- Skype: mycandyloveobsession@gmail.com
- Soundcloud: Breaking~Point
- Location: Ildis
-
Contact:
#8
Post
by Ladythief1997 » Mon Mar 28, 2016 4:12 pm
Ah.. your right my bad. Still don't know how to fix it though.
Writer looking for EXP go ahead and hit me up. ;D You know you want to.
-
Nylan
- Regular
- Posts: 47
- Joined: Tue Mar 08, 2016 4:11 am
- Completed: Segmentation_Fault (Nano16)
- Projects: Currently free
- Organization: MagicEngineering
-
Contact:
#9
Post
by Nylan » Mon Mar 28, 2016 8:32 pm
Code: Select all
init python:
define register_stat $ ("Strength", "strength", 10, 100)
define register_stat $ ("Intelligence", "intelligence", 10, 100)
dp_period("Morning", "morning_act")
dp_choice("Attend Class", "class")
dp_choice("Cut Class", "cut")
Your "define" statements are invalid.
http://www.diveintopython.net/getting_t ... _code.html
Not enough spaces in your indentation. You need 4.
-
philat
- Eileen-Class Veteran
- Posts: 1853
- Joined: Wed Dec 04, 2013 12:33 pm
-
Contact:
#10
Post
by philat » Tue Mar 29, 2016 5:31 am
At this point, I would strongly encourage you NOT to try to incorporate the DSE 3.0 framework into your own game right now and instead 1) study the example scripts of The Question and the Tutorial game along with the documentation (for instance, what does the $ sign do? What is the define statement?), and once you've done that, 2) simply start with the DSE 3.0 project as downloaded and study it so you can understand what you need to change to achieve what you want.
-
Ladythief1997
- Regular
- Posts: 44
- Joined: Tue Mar 08, 2016 6:09 pm
- Projects: Unnamed PJ
- Tumblr: genderbender1lover
- Deviantart: genderbender-lover
- Skype: mycandyloveobsession@gmail.com
- Soundcloud: Breaking~Point
- Location: Ildis
-
Contact:
#11
Post
by Ladythief1997 » Fri Apr 01, 2016 6:08 pm
philat wrote:At this point, I would strongly encourage you NOT to try to incorporate the DSE 3.0 framework into your own game right now and instead 1) study the example scripts of The Question and the Tutorial game along with the documentation (for instance, what does the $ sign do? What is the define statement?), and once you've done that, 2) simply start with the DSE 3.0 project as downloaded and study it so you can understand what you need to change to achieve what you want.
Not A bad idea except i'm on a serious time crunch and am NOT a fast learner. I was already planning on doing that later after I got help on this and shipped the game to a buddy of mine but THE CRUNCH GOT ME. I need serious help and quickly. T-T or my gaming life is utterly over.
Writer looking for EXP go ahead and hit me up. ;D You know you want to.
-
trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
-
Contact:
#12
Post
by trooper6 » Fri Apr 01, 2016 10:00 pm
Ladythief1997 wrote:philat wrote:At this point, I would strongly encourage you NOT to try to incorporate the DSE 3.0 framework into your own game right now and instead 1) study the example scripts of The Question and the Tutorial game along with the documentation (for instance, what does the $ sign do? What is the define statement?), and once you've done that, 2) simply start with the DSE 3.0 project as downloaded and study it so you can understand what you need to change to achieve what you want.
Not A bad idea except i'm on a serious time crunch and am NOT a fast learner. I was already planning on doing that later after I got help on this and shipped the game to a buddy of mine but THE CRUNCH GOT ME. I need serious help and quickly. T-T or my gaming life is utterly over.
The problem seems to be that you want to do DSE, which is advanced, and you don't understand how to do basics...and then you say you have no time to learn the basics. It is hard to understand advanced help when you don't know the basics. It takes longer than if you learned the process properly because none of the answers will make sense until you have a foundation.
So what are your options? If the game is free, and you are in a time crunch, maybe you can put up a recruitment ad in the looking for programmers and get someone to just code it for you. I can't, because I'm already working on two short free games, but maybe someone else will code it for you for free.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe:
http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
-
Ladythief1997
- Regular
- Posts: 44
- Joined: Tue Mar 08, 2016 6:09 pm
- Projects: Unnamed PJ
- Tumblr: genderbender1lover
- Deviantart: genderbender-lover
- Skype: mycandyloveobsession@gmail.com
- Soundcloud: Breaking~Point
- Location: Ildis
-
Contact:
#13
Post
by Ladythief1997 » Mon Apr 04, 2016 1:35 am
trooper6 wrote:Ladythief1997 wrote:philat wrote:At this point, I would strongly encourage you NOT to try to incorporate the DSE 3.0 framework into your own game right now and instead 1) study the example scripts of The Question and the Tutorial game along with the documentation (for instance, what does the $ sign do? What is the define statement?), and once you've done that, 2) simply start with the DSE 3.0 project as downloaded and study it so you can understand what you need to change to achieve what you want.
Not A bad idea except i'm on a serious time crunch and am NOT a fast learner. I was already planning on doing that later after I got help on this and shipped the game to a buddy of mine but THE CRUNCH GOT ME. I need serious help and quickly. T-T or my gaming life is utterly over.
The problem seems to be that you want to do DSE, which is advanced, and you don't understand how to do basics...and then you say you have no time to learn the basics. It is hard to understand advanced help when you don't know the basics. It takes longer than if you learned the process properly because none of the answers will make sense until you have a foundation.
So what are your options? If the game is free, and you are in a time crunch, maybe you can put up a recruitment ad in the looking for programmers and get someone to just code it for you. I can't, because I'm already working on two short free games, but maybe someone else will code it for you for free.
Okay I've miracle worked the project. I have one month to learn DSE any specific recommendations as to what I should learn to be able to fix the error on my own? I don't want to ask for shortcuts exactly but....Yeaa. Something that gives me enough understanding that gets me through this. Believe it or not a month is not as long as it sounds for me.
Writer looking for EXP go ahead and hit me up. ;D You know you want to.
Users browsing this forum: Bing [Bot], Kia, span4ev