Search found 2 matches

by Yuzumin
Sat Jun 30, 2018 11:54 pm
Forum: Ren'Py Questions and Announcements
Topic: "NameError: name not defined" when trying to use a user defined function
Replies: 1
Views: 733

Re: "NameError: name not defined" when trying to use a user defined function

Nevermind I figured it out after a while and reading through a bunch of the documentation. For anyone else that encounters this the main thing I got wrong was writing python init and instead wrote just python . As for efficiency I should've added an argument in the brackets of the function I was def...
by Yuzumin
Sat Jun 30, 2018 1:01 pm
Forum: Ren'Py Questions and Announcements
Topic: "NameError: name not defined" when trying to use a user defined function
Replies: 1
Views: 733

"NameError: name not defined" when trying to use a user defined function

Here is what I've written #rp for K default rp_k = 0 #rp for P default rp_p = 0 #rp for S default rp_s = 0 #rp for Y default rp_y = 0 python: def inc(): nonlocal [rp_y] rp_y += 1 def dec(): nonlocal [rp_y] rp_y -= 1 label start: menu: "This should lower rp for Y": $ dec() "This should...