Trouble with Coding

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
ShuraORandom
Newbie
Posts: 7
Joined: Sat Dec 31, 2011 12:53 am
Contact:

Trouble with Coding

#1 Post by ShuraORandom »

I am having all kinds of trouble with my script, I dunno if it's bugs with Ren'Py or if I've done something wrong with my script.

What the problem is, is that every time I launch my game it detects errors with indentation.

exp.

File "game/script.rpy", line 47: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.

But however it hasn't had a problem with this before... Has anyone else had this problem? If you have did you ever solve it? I'd like to know.

-Shura-

User avatar
Camille
Eileen-Class Veteran
Posts: 1227
Joined: Sat Apr 23, 2011 2:43 pm
Completed: Please see http://trash.moe
Projects: the head well lost
Organization: L3
Tumblr: narihira
Deviantart: crownwaltz
itch: lore
Contact:

Re: Trouble with Coding

#2 Post by Camille »

If you show us the code that the error is referring to, we might be able to help you better. D: Like, just show us a couple of lines using the

Code: Select all

 tags.

ShuraORandom
Newbie
Posts: 7
Joined: Sat Dec 31, 2011 12:53 am
Contact:

Re: Trouble with Coding

#3 Post by ShuraORandom »

Here's some of my coding

scene black with dissolve
show text "SOR Productions presents..." with Pause(1.5)
show text "Bronagh Cafe" with Pause(1.5)

scene bgcity
with dissolve
m "Honey, how was your trip?"

Okay one of my repeating problems is with the line "Honey how was your trip?" It keeps saying the error that I posted above. It's been having the same problem sense I've started working on my project. It's getting seriously annoying trying to fix it. I've had to edit over my script which is now over four hundred lines long now.

I'm not sure if this is what you wanted, I'll admit I know very little about coding. I did go to a tech class for a semester.... But my teacher sucked and I learned almost nothing.

redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Trouble with Coding

#4 Post by redeyesblackpanda »

It keeps reading until it hits a problem. Once it hits a problem, it'll stop and tell you. The thing is, it seems you have a lot of problems, so when you correct one, the next one pops up. Just keep correcting until it stops telling you that you have errors. If it says there's an error with indentation at that line, there probably is. Is that how your code looks with indentations?

When I write, I check for errors often so that I don't have to get all messed up. I'm not sure saying this at this point helps though. :lol:
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

ShuraORandom
Newbie
Posts: 7
Joined: Sat Dec 31, 2011 12:53 am
Contact:

Re: Trouble with Coding

#5 Post by ShuraORandom »

redeyesblackpanda wrote:It keeps reading until it hits a problem. Once it hits a problem, it'll stop and tell you. The thing is, it seems you have a lot of problems, so when you correct one, the next one pops up. Just keep correcting until it stops telling you that you have errors. If it says there's an error with indentation at that line, there probably is. Is that how your code looks with indentations?

When I write, I check for errors often so that I don't have to get all messed up. I'm not sure saying this at this point helps though. :lol:
Well, technically that's just the first few lines. All of my coding is indented and pretty clean.

So yeah that's what it looks like but it's not the whole thing. The thing I posted up is from what I seen, the most hated line in the whole script I wrote.

It only started with this problem when I decided that I was almost finished coding the teaser. But before that all the errors it hit were reasonable, like typos or forgotten parts to the coding. I seriously don't know what the problem is

redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Trouble with Coding

#6 Post by redeyesblackpanda »

Oh, the "with dissolve" could be the problem. Shouldn't it be on the same line as "scene bgcity"?
I'm saying this because of this: http://renpy.org/wiki/Fade

Code: Select all

Oh, yeah and you might want to use code tags...
They look like this without the periods... [code.]CODE_HERE[/code.]
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

ShuraORandom
Newbie
Posts: 7
Joined: Sat Dec 31, 2011 12:53 am
Contact:

Re: Trouble with Coding

#7 Post by ShuraORandom »

I just tried that, and it doesn't seem to be the problem... I came up with a whole mess of the same indent errors on different lines.

ShuraORandom
Newbie
Posts: 7
Joined: Sat Dec 31, 2011 12:53 am
Contact:

Re: Trouble with Coding

#8 Post by ShuraORandom »

I do also have code tags in my script, but I didn't post them up.

redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Trouble with Coding

#9 Post by redeyesblackpanda »

ShuraORandom wrote:I do also have code tags in my script, but I didn't post them up.
I'm talking about on the forum. I'm not sure putting that in your script is a good idea :shock: .

If the indent errors were further down, as in line 48 onward, then it fixed it! :D There can be multiple causes for an indent error, so the problem might be something else further down. Sounds to me that you just have a lot of bugs, so you've gotta keep squishing. :lol:

If this wasn't of help, I'm sorry, but I'm somewhat new myself... :oops:
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

ShuraORandom
Newbie
Posts: 7
Joined: Sat Dec 31, 2011 12:53 am
Contact:

Re: Trouble with Coding

#10 Post by ShuraORandom »

Ugh that's not what I meant.

I thought you meant where the coding tells you to put it like.
##game starts here

I'm sorry it's pretty late where I am and my mind doesn't really work well this time of day.

It didn't really help. But it's alright, at least you attempted to help.

redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Trouble with Coding

#11 Post by redeyesblackpanda »

Oh, if you do ##, it does nothing. Its not read, it's just notes. I hope you get the help you need, there are really experienced people here! :D (not me though...)
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

ShuraORandom
Newbie
Posts: 7
Joined: Sat Dec 31, 2011 12:53 am
Contact:

Re: Trouble with Coding

#12 Post by ShuraORandom »

Yeah, I know that ## is just a comment. I've had some experience with coding (not much though) I used to be one heck of a php coder. But that was almost a year ago and well I found php coding boring so I haven't done it sense.

But thanks for trying to help! As they say 'it's the thought that counts'.

Sadly it's not the thought that fixes the coding though....

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Trouble with Coding

#13 Post by Alex »

I suppose, that <m "Honey, how was your trip?"> is line 46, then check line 47 - it definitely indented too much (a single space can cause the trouble). Also, don't forget to save changes in your script, and don't use old saves - start game from the very beginning.

SinusPi
Newbie
Posts: 22
Joined: Tue Dec 27, 2011 6:30 pm
Contact:

Re: Trouble with Coding

#14 Post by SinusPi »

@ShuraORandom, always put your code in

Code: Select all

 ... 
tags when posting on the forum. Otherwise your indentation will not show, and since it's the main problem, it should definitely be preserved. So, either use the code tags, or use another code pasting service, like pastebin.com .

And don't be shy with your files - you might think the problem is in the code you paste, while actually the problem might lurk elsewhere. Go ahead and post a screenful of code - better post more than less.

Post Reply

Who is online

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