Create your AI Cum Slut -70% for Mother's Day
x

Ren'Py [Need Help with findinding mistakes and possible sollutions]

Cyber_V

New Member
Jul 5, 2024
2
0
Hey guys I am making a game for the first time in ren'py and facing this error when I am defining a new nvl character for the phone chat, I did not face any issues uptil adding mc and two characters:

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/chapter1.rpy", line 151, in script
d_nvl "Heyyyy gurlll! "
File "renpy/common/00nvl_mode.rpy", line 395, in do_display
renpy.display_say(
File "renpy/common/00nvl_mode.rpy", line 207, in nvl_show_core
return __nvl_show_screen("nvl", items=[ ])
File "renpy/common/00nvl_mode.rpy", line 201, in _m1_00nvl_mode__nvl_show_screen
return renpy.get_widget(screen_name, "what", config.nvl_layer)
File "game/screens.rpy", line 1303, in execute
screen nvl(dialogue, items=None):
File "game/screens.rpy", line 1303, in execute
screen nvl(dialogue, items=None):
File "game/screens.rpy", line 1306, in execute
if nvl_mode == "phone":
File "game/screens.rpy", line 1307, in execute
use PhoneDialogue(dialogue, items)
File "game/PhoneTexting.rpy", line 59, in execute
screen PhoneDialogue(dialogue, items=None):
File "game/PhoneTexting.rpy", line 59, in execute
screen PhoneDialogue(dialogue, items=None):
File "game/PhoneTexting.rpy", line 62, in execute
frame at phone_transform(phone_position_x, phone_position_y):
File "game/PhoneTexting.rpy", line 65, in execute
viewport:
File "game/PhoneTexting.rpy", line 71, in execute
vbox:
File "game/PhoneTexting.rpy", line 73, in execute
use nvl_phonetext(dialogue)
File "game/PhoneTexting.rpy", line 77, in execute
screen nvl_phonetext(dialogue):
File "game/PhoneTexting.rpy", line 77, in execute
screen nvl_phonetext(dialogue):
File "game/PhoneTexting.rpy", line 81, in execute
for id_d, d in enumerate(dialogue):
File "game/PhoneTexting.rpy", line 82, in execute
if d.who == None: # Narrator
File "game/PhoneTexting.rpy", line 113, in execute
hbox:
File "game/PhoneTexting.rpy", line 145, in execute
vbox:
File "game/PhoneTexting.rpy", line 150, in execute
frame:
File "game/PhoneTexting.rpy", line 150, in keywords
frame:
File "game/PhoneTexting.rpy", line 153, in <module>
background Frame(message_frame, 23,23,23,23)
NameError: name 'message_frame' is not defined

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

Full traceback:
File "game/chapter1.rpy", line 151, in script
d_nvl "Heyyyy gurlll! "
File "E:\Softwares\renpy-8.3.4-sdk.7z\renpy-8.3.4-sdk\renpy\ast.py", line 2579, in execute
Say.execute(self)
File "E:\Softwares\renpy-8.3.4-sdk.7z\renpy-8.3.4-sdk\renpy\ast.py", line 621, in execute
renpy.exports.say(who, what, *args, **kwargs)
File "E:\Softwares\renpy-8.3.4-sdk.7z\renpy-8.3.4-sdk\renpy\exports\sayexports.py", line 132, in say
who(what, *args, **kwargs)
File "E:\Softwares\renpy-8.3.4-sdk.7z\renpy-8.3.4-sdk\renpy\character.py", line 1455, in __call__
self.do_display(who, what, cb_args=self.cb_args, dtt=dtt, **display_args)
File "renpy/common/00nvl_mode.rpy", line 395, in do_display
renpy.display_say(
File "E:\Softwares\renpy-8.3.4-sdk.7z\renpy-8.3.4-sdk\renpy\character.py", line 735, in display_say
what_text = show_function(who, what_string, **show_args)
File "renpy/common/00nvl_mode.rpy", line 207, in nvl_show_core
return __nvl_show_screen("nvl", items=[ ])
File "renpy/common/00nvl_mode.rpy", line 201, in _m1_00nvl_mode__nvl_show_screen
return renpy.get_widget(screen_name, "what", config.nvl_layer)
File "E:\Softwares\renpy-8.3.4-sdk.7z\renpy-8.3.4-sdk\renpy\display\screen.py", line 1538, in get_displayable
screen.update()
File "E:\Softwares\renpy-8.3.4-sdk.7z\renpy-8.3.4-sdk\renpy\display\screen.py", line 697, in update
self.screen.function(**self.scope)
File "game/screens.rpy", line 1303, in execute
screen nvl(dialogue, items=None):
File "game/screens.rpy", line 1303, in execute
screen nvl(dialogue, items=None):
File "game/screens.rpy", line 1306, in execute
if nvl_mode == "phone":
File "game/screens.rpy", line 1307, in execute
use PhoneDialogue(dialogue, items)
File "game/PhoneTexting.rpy", line 59, in execute
screen PhoneDialogue(dialogue, items=None):
File "game/PhoneTexting.rpy", line 59, in execute
screen PhoneDialogue(dialogue, items=None):
File "game/PhoneTexting.rpy", line 62, in execute
frame at phone_transform(phone_position_x, phone_position_y):
File "game/PhoneTexting.rpy", line 65, in execute
viewport:
File "game/PhoneTexting.rpy", line 71, in execute
vbox:
File "game/PhoneTexting.rpy", line 73, in execute
use nvl_phonetext(dialogue)
File "game/PhoneTexting.rpy", line 77, in execute
screen nvl_phonetext(dialogue):
File "game/PhoneTexting.rpy", line 77, in execute
screen nvl_phonetext(dialogue):
File "game/PhoneTexting.rpy", line 81, in execute
for id_d, d in enumerate(dialogue):
File "game/PhoneTexting.rpy", line 82, in execute
if d.who == None: # Narrator
File "game/PhoneTexting.rpy", line 113, in execute
hbox:
File "game/PhoneTexting.rpy", line 145, in execute
vbox:
File "game/PhoneTexting.rpy", line 150, in execute
frame:
File "game/PhoneTexting.rpy", line 150, in keywords
frame:
File "game/PhoneTexting.rpy", line 153, in <module>
background Frame(message_frame, 23,23,23,23)
NameError: name 'message_frame' is not defined

Windows-10-10.0.19045 AMD64
Ren'Py 8.3.4.24120703
Pete_n_Emily 1.0
Sun Feb 2 13:07:37 2025

Please help
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,811
18,243
File "game/PhoneTexting.rpy", line 153, in <module>
background Frame(message_frame, 23,23,23,23)
NameError: name 'message_frame' is not defined
Well, like the error message , there's no variable, or due to the context, no defined image, named "message_frame"...

Create the variable, with its expected value, or define the image, depending on what you intended to do, and the problem will be solved.
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,930
5,597
When looking at the Renpy exception messages, you need to understand that the actual error string is at the end of the backtrace.

in this case: NameError: name 'message_frame' is not defined

The start filename/line number of the trace can help you track down where the error is being triggered.
The in-between lines of the trace are not very often helpful, as they often descend into the Renpy internals
The end filename/line number of the trace can help you track down where the error is located.

Unfortunately there are no shortcuts; only experience, understanding and logical thinking will help you find the cause of exceptions.
 
  • Like
Reactions: anne O'nymous