New, and need a little help.

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
wakagana
Veteran
Posts: 374
Joined: Mon May 14, 2012 1:27 am
Projects: Flash Q
Organization: Team Bread
Contact:

New, and need a little help.

#1 Post by wakagana » Mon May 14, 2012 1:37 am

Hey guys, I'm new to the forum but have used it in the past to tune up a bit of what I've been working on from the answers already on the forum, I've found a little bit of a rock in my way and I cant seem to figure out why its not working, perhaps I'm just over looking something really simple, but...

Here's whats happening. throughout the script i'm working on I have

Example:
If Placeholder_points > Otherplaceholder_points

Blah blah blah

If Otherplaceholder_points > Placeholder_points

Bloo bloo bloo
End Example:

For some reason the game isn't picking up my choices even though I do have the point system laid out at the start, I was able to get it to pick up the choices once, but it was saying after each ( ****_points > ****_points ) that 'if statement expects a non empty block'

I'll copy paste some of the examples I have in here.

label start:
$ Y_points = 0
$ MA_points = 0
$ G_points = 0
$ K_points = 0
$ EE_points = 0
$ T_points = 0
$ E_points = 0
$ J_points = 0
$ MY_points = 0
$ Nuetral_points = 0
(My point system at the start)

(The area that is causing me trouble)


"After what seems like ages class ends and everyone stands up and funnels out of the rooms once again, some sticking around to chat with the teachers and other students,
and others make their way out to the fields and dorms."

"I leave as quickly as I can, figuring I might just spend the rest of the day relaxing in my room."

"The day is calming down and the sun is slowly setting in the sky, the once clear and blue sky was starting to get enshrouded with clouds,
and I could see by the depth and darkness in them that it may rain tonight."

"I grasp my bag tight around my shoulder and make my way to the dorm rooms like some of the other kids, avoiding contact with anyone for the most part unless they gestured me over."

if Nuetral_points > T_points:

"I want to get my stuff packed, lugging this bag around all day wasn’t exactly fun, but at least the days over, kind of interesting for a school schedule,
I have two extremely long classes and a decent lunch break and then schools over..."

"As I get closer to the dorms I realize there is a small garden area for students and teachers alike to work on things in their free time in peace."

"Both the dorms are relatively close together, but have enough privacy from one another to not have to worry about being bothered by the opposite sex."

"Each dorm has a small walkway and staircase that rises up from the garden to the building that are within the left and right of the gardens center feature, which is a small fountain."

"I notice a sign that says the male dorms are on the right and I make my way up the steps and I open a large mahogany door."

"As I enter the building I feel a little relieved, the inside of the dorm looks really nice, their was a decent sized lobby, so people could hang around outside of their
rooms if it was raining, and straight ahead from entering there is a staircase, I know my room is on the second floor."

"That was probably one of the most exciting things I was looking forward to when I learned that the school even had dorm rooms. I climb the stairways and I try to recall what
number room I had. I turn down a hallway only to find I needed to go the exact opposite direction."

"I do so and eventually find my room; I look down to see a small envelope hanging from the doorknob by a string. I unloop it from the knob and open it to find a small note and a key."

"We hope you enjoy your enrollment here: ‘Marcus Feick’"

"I hear something behind me, it was from the room across the hall from my room...but I dont pay it much attention."

"I take the key from envelope and I open my room with it, entering the room I find it’s a sort of small."

"I glance around for a bit, checking the room out, a bed, a window facing towards the outside to look out over the field, school, and most of all the cherry trees, and even a bathroom."

"This felt like fancy living."

"I settle my bag down on my bed and start to pull out my clothes, only realizing half way through that my room also had a Drawer luckily."

"I go about stuffing my cloths in each of the Drawers and once I’m done packing I peek my head into the bathroom, a small shower, sink, and toilet were there."

"Nothing special, but it was more then I think any other teenager outside of the schools enrollment would get."

"I finally finish packing and my door slams open, nearly cracking the wall open with the knob."

if T_points > Nuetral_points:
"I make my way back to my room, and I hear something behind me, it was from the room across the hall from my room..."

"I slip into my room casually and go about setting my stuff down by the side of the bed."

"I'm about to sit down and relax, and my door slams open, nearly cracking the wall open with the knob."

if MA_points > Y_points:

"I can’t help but yell out in frustration."

M "Dude, the fuck."

"Before I can even stop the intruder the door is closed, and I’m stuck in my own room with who I assume is the freak from across the hallway. Eventually I’m able to get a good look at them."

"My eyes droop slightly at what I see and I can tell it’s the kid I saw the night before at my uncles. He locks the door behind him so no one else can come into my room."


( If anyone has any idea as to what the problem is please tell me, because for what ever reason Its either not running the game due to the statement block not being correct or not following my choices and just blurting out the next lines text. Thank you for the help in the meantime, I'm working on a very large visual novel project for my senior year portfolio (next year) and I'm trying to learn all of this. Its alot of work, but I think I can do it with a little assistance here and there. Thanks again! - Wakagana )

User avatar
Spiky Caterpillar
Veteran
Posts: 253
Joined: Fri Nov 14, 2008 7:59 pm
Completed: Lots.
Projects: Black Closet
Organization: Slipshod
Location: Behind you.
Contact:

Re: New, and need a little help.

#2 Post by Spiky Caterpillar » Mon May 14, 2012 1:41 am

If the code looks the same in your text editor as it does on the forum, the problem is that you aren't indenting
after your ifs. Things like:

Code: Select all

if T_points > Nuetral_points:
"I make my way back to my room, and I hear something behind me, it was from the room across the hall from my room..."
should be

Code: Select all

if T_points > Nuetral_points:
    "I make my way back to my room, and I hear something behind me, it was from the room across the hall from my room..."
(Also, I think this should be in the Ren'Py forum rather than the general, but I have no magic mod powers.)
Nom nom nom nom nom LEAVES.

User avatar
wakagana
Veteran
Posts: 374
Joined: Mon May 14, 2012 1:27 am
Projects: Flash Q
Organization: Team Bread
Contact:

Re: New, and need a little help.

#3 Post by wakagana » Mon May 14, 2012 1:45 am

I figured I would be posting in the wrong spot, but I now at least know that is the case.

And...

When I do indent it like so, the first line right under it that I'm indenting doesn't even show up in game, it just skips onto the next line and doesn't compute the fact that I had an If T_points > Nuetral_points.

Also, could you direct me to the area that is best for getting these questions solved?

*Edit, never mind, I found it, sorry x3

User avatar
pucedragonlord
Regular
Posts: 159
Joined: Wed May 09, 2012 2:49 am
Projects: The Diviner
Organization: Two Crowns Entertainment
Location: Now: Charlottesville, VA
Contact:

Re: New, and need a little help.

#4 Post by pucedragonlord » Tue May 15, 2012 10:41 am

are your T_points > Neutral_points? You jump, so I can't tell if you do or not, but if it computes to false you won't see it (as is the intention, I imagine). If you need to debug, put a line before the if statement that looks like:

"current T points are [T_points] and Neutral points are [Neutral_points]"

If it turns out the if statement is returning false, your problem is in the point setting.

Also try putting a "$" in front of the if statement, so it reads it as a Python line and not a standard script line and see if that helps any.
The more you know

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]