As the subject title suggests, I've been having problems with KeyError: u'p'. But due to the odd concept of my game, I haven't been able to find help online. That'll probably be an easy fix, but hey, I'm a total newbie at this!
To sum up this part of my game, there's no concept of save slots or a linear story. The idea is that you boot up the game the first time, enter your name, go through a sort of intro and then after that, every time you reboot the game you start at a certain point and your name has already been entered.
Here's my code so far:
Code: Select all
define c = Character("Nell")
define name = Character('[p]')
define persistent.introscene = 0
label start:
$_game_menu_screen = None
if persistent.introscene:
jump chatbase
label intro:
show nell idle
c "Hey there."
c "My name is Nell, it's very nice to meet you."
c "I'd love to get to know you, what's your name?"
$ p = renpy.input("What is your name?").strip()
c "[p]? Okay!"
$ persistent.introscene = 1
label chatbase:
c "Hello, [p]!"
Any tips on solving this? Sorry for being such a newbie!
Cheers