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.
Hello, i'm trying to get points to work but i'm not sure if i'm doing this right. I'm sorry if it's very obvious, I'm fairly new to coding ;;;
I'm getting an exception for the following code in my game:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 131, in script
guy "hii"
Exception: Sayer guy is not a function or string.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 131, in script
vika "hii"
File "/Users/", line 631, in execute
raise Exception("Sayer %s is not a function or string." % self.who.encode("utf-8"))
Exception: Sayer guy is not a function or string.
yierqi wrote: ↑Mon Sep 24, 2018 11:42 pm
Hello, i'm trying to get points to work but i'm not sure if i'm doing this right. I'm sorry if it's very obvious, I'm fairly new to coding ;;;
I'm getting an exception for the following code in my game:
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 131, in script
guy "hii"
Exception: Sayer guy is not a function or string.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 131, in script
vika "hii"
File "/Users/", line 631, in execute
raise Exception("Sayer %s is not a function or string." % self.who.encode("utf-8"))
Exception: Sayer guy is not a function or string.
You are using 'guy' as a variable holding a integer value.
On the last line you are using 'guy' as a character.
Maybe you have a definition earlier in the code like this?
Don't use the same name for different things. Rename your variable i.e. 'guy_points' so you have 'guy' for the character and 'guy_points' for the variable.