- Sep 30, 2017
- 2,346
- 4,915
Sorry if something like this has been asked before:
So I want to do the following at the Renpy say section:
This calls the following function:
The error I'm getting are
File "game/Z updatecharstats.rpy", line 1102, in setpersonchat
TPersonchat = "T"+name#.lower()
TypeError: coercing to Unicode: need string or buffer, NoneType found
(OK, I commented out the lower() function... Ignore that please)
I'm pretty sure it's something dumb, by not casting the who as a string.
So I want to do the following at the Renpy say section:
Code:
screen say(who, what):
style_prefix "say"
$ setpersonchat(who)
window:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what id "what"
## If there's a side image, display it above the text. Do not display on the
## phone variant - there's no room.
if not renpy.variant("small"):
add SideImage() xoffset 20 xalign 0.0 yalign 1.0
This calls the following function:
Code:
def setpersonchat(name):
TPersonchat = "T"+name.lower()
getattr(store, TPersonchat ).top = 1
renpy.show_screen("topbar")
The error I'm getting are
File "game/Z updatecharstats.rpy", line 1102, in setpersonchat
TPersonchat = "T"+name#.lower()
TypeError: coercing to Unicode: need string or buffer, NoneType found
(OK, I commented out the lower() function... Ignore that please)
I'm pretty sure it's something dumb, by not casting the who as a string.