Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 12, in script
python:
File "game/script.rpy", line 79, in <module>
base = Base() # основной класс участка
File "game/script/core - classes.rpy", line 73, in __init__
self.pc = Hero(datafolder='content/unique_characters/hero')
File "game/script/dungeon - classes.rpy", line 77, in __init__
self.skills[entry] = Skill(data[entry],path)
File "game/script/dungeon - classes.rpy", line 398, in __init__
self.icon = ProportionalScale(self.iconfile,100,100)
File "game/lib/lib - common.rpy", line 299, in ProportionalScale
currentwidth, currentheight = get_size(img)
File "game/lib/lib - common.rpy", line 321, in get_size
w, h = renpy.render(d, 0, 0, 0, 0).get_size()
AttributeError: 'NoneType' object has no attribute 'mutated_surface'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "D:\Soft\renpy-6.99.11-sdk\renpy\bootstrap.py", line 290, in bootstrap
renpy.main.main()
File "D:\Soft\renpy-6.99.11-sdk\renpy\main.py", line 487, in main
run(restart)
File "D:\Soft\renpy-6.99.11-sdk\renpy\main.py", line 147, in run
renpy.execution.run_context(True)
File "D:\Soft\renpy-6.99.11-sdk\renpy\execution.py", line 761, in run_context
context.run()
File "game/script.rpy", line 12, in script
python:
File "D:\Soft\renpy-6.99.11-sdk\renpy\ast.py", line 814, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "D:\Soft\renpy-6.99.11-sdk\renpy\python.py", line 1695, in py_exec_bytecode
exec bytecode in globals, locals
File "game/script.rpy", line 79, in <module>
base = Base() # основной класс участка
File "game/script/core - classes.rpy", line 73, in __init__
self.pc = Hero(datafolder='content/unique_characters/hero')
File "game/script/dungeon - classes.rpy", line 77, in __init__
self.skills[entry] = Skill(data[entry],path)
File "game/script/dungeon - classes.rpy", line 398, in __init__
self.icon = ProportionalScale(self.iconfile,100,100)
File "game/lib/lib - common.rpy", line 299, in ProportionalScale
currentwidth, currentheight = get_size(img)
File "game/lib/lib - common.rpy", line 321, in get_size
w, h = renpy.render(d, 0, 0, 0, 0).get_size()
File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen\renpy.display.render.c:3321)
cpdef render(d, object widtho, object heighto, double st, double at):
File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen\renpy.display.render.c:2859)
rv = d.render(widtho, heighto, st, at)
File "D:\Soft\renpy-6.99.11-sdk\renpy\display\im.py", line 473, in render
im = cache.get(self)
File "D:\Soft\renpy-6.99.11-sdk\renpy\display\im.py", line 217, in get
renpy.display.render.mutated_surface(ce.surf)
File "renpy/display/render.pyx", line 401, in renpy.display.render.mutated_surface (gen\renpy.display.render.c:6511)
renpy.display.draw.mutated_surface(surf)
AttributeError: 'NoneType' object has no attribute 'mutated_surface'
Windows-7-6.1.7601-SP1
Ren'Py 6.99.12.2.2029
Legends_of_Alkion 1.0
Referring function:
Code: Select all
def ProportionalScale(img, maxwidth, maxheight):
currentwidth, currentheight = get_size(img)
xscale = float(maxwidth) / float(currentwidth)
yscale = float(maxheight) / float(currentheight)
if xscale < yscale:
minscale = xscale
else:
minscale = yscale
newwidth = currentwidth * minscale
newheight = currentheight * minscale
return im.FactorScale(img,minscale,minscale)
def resize(img, x=400, y=400):
return ProportionalScale(img, x, y)
def get_size(d):
d = renpy.easy.displayable(d)
w, h = renpy.render(d, 0, 0, 0, 0).get_size()
w, h = int(round(w)), int(round(h))
return w, h
Thanks in advance.