Same problem for me and I've tried thisKindynos wrote:Hello! I must say that your code is really nice-looking, and useful! However, I'm having a bit of a trouble with it, I suppose you can help me, yes?
So, pasting it to my game didn't work properly, so I did it the other way round, pasting my game's files on to your code. but it gave me this one traceback
I checked these lines and this is what I have.I'm sorry, but an uncaught exception occurred.
While executing init code:
File "game/screens.rpy", line 582, in script
File "game/screens.rpy", line 585, in python
Exception: Expected an image, but got a general displayable.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\Documents and Settings\csepulve\Desktop\javivivuvu\ren'py\renpy-6.15.7-sdk\renpy\bootstrap.py", line 265, in bootstrap
renpy.main.main()
File "C:\Documents and Settings\csepulve\Desktop\javivivuvu\ren'py\renpy-6.15.7-sdk\renpy\main.py", line 269, in main
game.context().run(node)
File "C:\Documents and Settings\csepulve\Desktop\javivivuvu\ren'py\renpy-6.15.7-sdk\renpy\execution.py", line 288, in run
node.execute()
File "C:\Documents and Settings\csepulve\Desktop\javivivuvu\ren'py\renpy-6.15.7-sdk\renpy\ast.py", line 718, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "C:\Documents and Settings\csepulve\Desktop\javivivuvu\ren'py\renpy-6.15.7-sdk\renpy\python.py", line 1297, in py_exec_bytecode
exec bytecode in globals, locals
File "game/screens.rpy", line 585, in <module>
renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y))
File "C:\Documents and Settings\csepulve\Desktop\javivivuvu\ren'py\renpy-6.15.7-sdk\renpy\display\im.py", line 643, in __init__
im = image(im)
File "C:\Documents and Settings\csepulve\Desktop\javivivuvu\ren'py\renpy-6.15.7-sdk\renpy\display\im.py", line 1536, in image
return image(arg.target, loose=loose, **properties)
File "C:\Documents and Settings\csepulve\Desktop\javivivuvu\ren'py\renpy-6.15.7-sdk\renpy\display\im.py", line 1551, in image
raise Exception("Expected an image, but got a general displayable.")
Exception: Expected an image, but got a general displayable.
Windows-XP-5.1.2600-SP3
Ren'Py 6.15.7.374
A Ren'Py Game 0.0
I honestly don't understand how to fix that ;; may you help me?Code: Select all
init python: # Here we create the thumbnails. We create a grayscale thumbnail image for BGs, but we use a special "locked" image for CGs to prevent spoilers. for gal_item in gallery_cg_items: renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y)) for gal_item in gallery_bg_items: renpy.image (gal_item + " butt", im.Scale(ImageReference(gal_item), thumbnail_x, thumbnail_y)) renpy.image (gal_item + " butt dis", im.Grayscale(ImageReference(gal_item + " butt")))
//by the way I'm just trying to do a CG gallery, actually, not the bg one//
and thatYou need to replace "cg1", "cg2",... with your images. If you've done that, check your image definitions for typos.
, but it doesn't work.Also delete all the lines that include the word "bg"
I don't understand what's the matter since it works perfectly in the exemple you provide.
I don't understand either what "butt" suppose to be. Yes, a button, but what for and wich image should we use to replace it? It will be usefull if you explain it clearly.
P.S. : I'm using a 1280 x 720 resolution, but I don't think it's a problem, because I've tried to add the same resolution to your exemple and once again it works perfectly.
So, it will be really nice if you can solve this out!