Page 1 of 1

image.setBody( body ) not working

Posted: Sun Apr 13, 2014 8:12 am
by joolean
With the following script:

image img = getImage("testImage");
body b = getBody("testBody");
img.setBody( b );

I get the following error
"Invalid body passed to setBody (image id 1)"

Doesn't matter whether I use string names or ids and I've tried various image, body and script scenarios but nothing seems to work.

Bah I just resolved it by going
img.setBody( b.id );
instead. Still, what is the reason the first version doesn't work?
Thanks,
Jules.

Re: image.setBody( body ) not working

Posted: Sun Apr 13, 2014 11:22 am
by iforce2d
Hi Jules
Thanks for reporting this, it was a bug. Since it was an extremely simple fix (just one character :)) I have "retro-fixed" it in the current 1.5.4 that is already up on the server. You can make another build of 1.5.4 if you like.

Re: image.setBody( body ) not working

Posted: Wed Apr 16, 2014 11:20 am
by joolean
Great!
Thank you.