Page 1 of 1

Text input problems.

Posted: Sun Apr 26, 2020 9:15 am
by Arkilos
Hi, sorry if this is trivual, but I have no idea how to solve this one and this is my first visual novel and I have no real prior experience to fall back upon.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 30, in script
    povfname "My name is [povname female]!"
Exception: Sayer 'povfname' is not defined.

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

Full traceback:
  File "game/script.rpy", line 30, in script
    povfname "My name is [povname female]!"
  File "D:\VN Work\renpy-7.3.5-sdk\renpy\ast.py", line 678, in execute
    who = eval_who(self.who, self.who_fast)
  File "D:\VN Work\renpy-7.3.5-sdk\renpy\ast.py", line 576, in eval_who
    raise Exception("Sayer '%s' is not defined." % who.encode("utf-8"))
Exception: Sayer 'povfname' is not defined.

Windows-8-6.2.9200
Ren'Py 7.3.5.606
The Sushi Bar 1.0
Sun Apr 26 16:10:53 2020
Here is the original code

Code: Select all

# The Sushi Bar.
# Characters.

define pov = Character("[povname female]")
define pov = Character("[povname male]")

label start:
#image of a regional train travelling through the countryside.
    "it has been a few years since you have last set foot at home."
    "there passing came as a great surprise for you."
#Choice 1
    menu:
        "A young middle school girl.":
            jump choice_girl
        "A young middle schoolboy.":
            jump choice_boy

label choice_girl:
    "A young middle school girl."
    "you have long light brown hair flowing down in waves down to your shoulders..."
    "a trait that you have inherited from your mother"

python:
    povname = renpy.input("What is your name?")
    povname = povname.strip()

    if not povname:
         povname = "Sora"

povfname "My name is [povname female]!"

"It had been close to a month since your parts passed away."

label choice_boy:
    "A young middle schoolboy."
    "you have short messy black hair..."
    "a trait that you have inherited from your father"

python:
    povname = renpy.input("What is your name?")
    povname = povname.strip()

    if not povname:
         povname = "Hiro"

povfname "My name is [povname male]!"

"It had been close to a month since your parts passed away."

label choice_done:

return
as already mentioned, I am not sure what I am doing with this other than what I want to accomplish which in this opening scene is to give the player the option of gender and the ability name the main character.
hope someone can help tell me what I am doing wrong here.
Novum.

Re: Text input problems.

Posted: Sun Apr 26, 2020 9:22 am
by isobellesophia
povfemale, you missspelled.

Re: Text input problems.

Posted: Sun Apr 26, 2020 9:25 am
by Arkilos
that can't be the only problem, can it?

Solved the problem, thank you for your help.