Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Tue May 21, 2013 12:47 pm

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Inverting colors
PostPosted: Sun Jan 16, 2011 12:58 am 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
Sorry for nagging again, but I'm in a stump once more.
I've been using the following:
Code:
    image bg classroom Sepia= im.Sepia("Graphics/backgrounds/bg_05a.png")

Every time I try to start the game though, I get an error
Code:
TypeError: object of type 'function' has no len()

I have no idea what I did wrong.


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:02 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10774
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
Can you give the full traceback? This looks to be correct, so something is probably going wrong in Ren'Py.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:09 am 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
Ok, here you go^^


Attachments:
traceback.txt [1.49 KiB]
Downloaded 7 times
Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:17 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10774
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
I'm not sure what's going on here - the traceback has something to do with im.Recolor, not im.Sepia. (Despite the names, they're not that related.)

Can you try making a new game, copying just the image definition in there, and running it? At least for me, I'm unable to repeat the problem on 6.11.2 or -dev.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:28 am 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
I tried downloading RenPy one more time and pasting the code on a new, empty project. I still get the same error. Does a different way of inverting colors maybe exist? I could try it that way because I really have no idea what's goinf on here xD


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:31 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10774
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
Yes, invert colors with:

Code:
image logo inverted = im.MatrixColor("logo.png", im.matrix.invert())

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:36 am 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
I have to apologize, but just now I've noticed that I've pasted the wrong code >.<
It was supposed to be this one
Code:
image bg classroom Negative= im.MatrixColor("Graphics/backgrounds/bg_05a.png", im.matrix.invert)


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:37 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10774
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
Oh. In that case, it's because you forgot the parenthesis after invert.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:38 am 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
I also tried it with that, but then I get:
Code:
I'm sorry, but an uncaught exception occurred.

Exception: Not a displayable: (<'MatrixColor' <'Image' 'Graphics/backgrounds/bg_05a.png'> (-1, 0, 0, 0, 1, 0, -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1)>,)

While executing init code:
 - script at line 9 of E:\Program Files\Bohemia Interactive\durarara!!\edg/game/script.rpy

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

  File "E:\Program Files\Bohemia Interactive\durarara!!\renpy-6.11.2\renpy\bootstrap.py", line 270, in bootstrap
  File "E:\Program Files\Bohemia Interactive\durarara!!\renpy-6.11.2\renpy\main.py", line 255, in main
  File "E:\Program Files\Bohemia Interactive\durarara!!\renpy-6.11.2\renpy\execution.py", line 259, in run
  File "E:\Program Files\Bohemia Interactive\durarara!!\renpy-6.11.2\renpy\ast.py", line 651, in execute
  File "E:\Program Files\Bohemia Interactive\durarara!!\renpy-6.11.2\renpy\exports.py", line 157, in image
  File "E:\Program Files\Bohemia Interactive\durarara!!\renpy-6.11.2\renpy\easy.py", line 87, in displayable
Exception: Not a displayable: (<'MatrixColor' <'Image' 'Graphics/backgrounds/bg_05a.png'> (-1, 0, 0, 0, 1, 0, -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1)>,)

While executing init code:
 - script at line 9 of E:\Program Files\Bohemia Interactive\durarara!!\edg/game/script.rpy

Ren'Py Version: Ren'Py 6.11.2b


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 1:54 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10774
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
Is there a stray comma on line 9?

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
 Post subject: Re: Inverting colors
PostPosted: Sun Jan 16, 2011 2:00 am 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
Yeah, and now that I've removed it, everything works. I knew it was something unbelievably silly >.<
Sorry for wasting your time, PyTom. I really appreciate the effort.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group