Python 由于未知原因,在游戏开始前,Ren'py未捕获异常
我很高兴地在Ren'Py6.99.14.3中编程,我启动了游戏,但出现了一个错误。我试着回到上次在我的脚本中运行游戏的时候,但我仍然有错误。我试着研究了一会儿,但作为一个初学者,我一点也不知道 这里是“traceback.txt”的第一部分,而不是完整的回溯部分Python 由于未知原因,在游戏开始前,Ren'py未捕获异常,python,renpy,Python,Renpy,我很高兴地在Ren'Py6.99.14.3中编程,我启动了游戏,但出现了一个错误。我试着回到上次在我的脚本中运行游戏的时候,但我仍然有错误。我试着研究了一会儿,但作为一个初学者,我一点也不知道 这里是“traceback.txt”的第一部分,而不是完整的回溯部分 I'm sorry, but an uncaught exception occurred. After initialization, but before game start. File "game/screens.rpy"
I'm sorry, but an uncaught exception occurred.
After initialization, but before game start.
File "game/screens.rpy", line 714, in prepare_screen
screen preferences():
File "game/screens.rpy", line 714, in prepare
screen preferences():
File "game/screens.rpy", line 718, in prepare
use game_menu(_("Preferences"), scroll="viewport"):
File "game/screens.rpy", line 718, in prepare
use game_menu(_("Preferences"), scroll="viewport"):
File "game/screens.rpy", line 720, in prepare
vbox:
File "game/screens.rpy", line 720, in prepare
vbox:
File "game/screens.rpy", line 722, in prepare
hbox:
File "game/screens.rpy", line 722, in prepare
hbox:
File "game/screens.rpy", line 725, in prepare
if renpy.variant("pc"):
File "game/screens.rpy", line 725, in prepare
if renpy.variant("pc"):
File "game/screens.rpy", line 727, in prepare
vbox:
File "game/screens.rpy", line 727, in prepare
vbox:
File "game/screens.rpy", line 730, in prepare
textbutton _("Window") action Preference("display", "window")
File "game/screens.rpy", line 730, in prepare
textbutton _("Window") action Preference("display", "window")
File "renpy/common/00preferences.rpy", line 454, in Preference
rv = get()
File "renpy/common/00preferences.rpy", line 211, in get
return __DisplayAction(1.0)
File "renpy/common/00preferences.rpy", line 27, in __init__
self.width = int(factor * config.screen_width)
Exception: Character expects its what argument to be a string, got 1280.0.
如果你愿意,如果我可以,我会提供更多的信息
谢谢你的帮助
"Exception: Character expects its what argument to be a string, got 1280.0."
您是否将其中一个字符定义为int,如下所示
define int = Character ('Name', color="ffffff", show_two_window=True,)
Int代表integer,这是一种处理数字的编程变量,因此您可能会在其中包含数字1280.0,它试图找到一个数字来处理。下面是一个列表,可以帮助您再次避免这些错误,或者查看您是否将其命名为其他不应该命名的名称