help! simple problem

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
birdybirdnerd
Newbie
Posts: 7
Joined: Sun Jun 17, 2018 10:46 am
Tumblr: birdybirdnerd
Contact:

help! simple problem

#1 Post by birdybirdnerd » Sun Jun 17, 2018 10:49 am

i just started using renpy and python to code a visual novel, and ive already run into a problem. i know its probably super easy to fix, but im struggling and its embarrassing. ive actually run into a few while trying to run what i have so far, but ill start with the top one so i can see what the others are as they get fixed

python:
name = renpy.input("What's your name?")

name = name.strip() or "You"

d "Oh, [name], what a wonderful name! I'm Domrick, by the way."

i have this, but every time i try to run it, im told that the last line there has 'invalid syntax'. what does that mean, and how can i fix it?

thank you so much for anyone who can helpl! im super frustrated i got defeated so easily, but ive never coded anything before and its all new to me

EDIT: okay for some reason it didnt indent where i indented, but the three lines after 'python' are in fact indented, though just once. in case thats relevant

User avatar
Per K Grok
Regular
Posts: 174
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls
Projects: Defenders of Adacan
Deviantart: pekj
itch: per-k-grok
Location: Sverige
Contact:

Re: help! simple problem

#2 Post by Per K Grok » Sun Jun 17, 2018 11:23 am

The dialogue line should not be part of the python block.

Code: Select all

python:
      name = renpy.input("What's your name?")
      name = name.strip() or "You"

d "Oh, [name], what a wonderful name! I'm Domrick, by the way." 
Image Visual Story Telling, DeviantArt Group for animations, comics, games and illustrations https://www.deviantart.com/acgi

birdybirdnerd
Newbie
Posts: 7
Joined: Sun Jun 17, 2018 10:46 am
Tumblr: birdybirdnerd
Contact:

Re: help! simple problem

#3 Post by birdybirdnerd » Sun Jun 17, 2018 11:28 am

THERE it goes. i had the indentations all messed up apparently. it runs now! thank you so much! ill probably be back after i write some more and come across another problem, but for now: thank you!!!!

Post Reply

Who is online

Users browsing this forum: No registered users