CopyImage problem

Blitz3D Forums/Blitz3D Programming/CopyImage problem

duh!

got it now, thanks!

It was because I was using a sprite library (that I wrote, so *really* I should have spotted what was going on!), and the library uses a different variable (SpriteItem\image) to store the integer handle to the image in question.

I've been happily using it for months without altering images in-game, just creating them at startup and destroying them when the program ends.

of course, FreeImage bat(num) : bat(num) = CopyImage bat(0) was assigning a new value to bat(num), but not updating SpriteItem\image. My own function worked because it was copying the new image into the original, simply resizing the the original image to match the new size, all the while keeping its original handle.

It's just sloppy coding... I originally thought this project would be very small and simple and wouldn't require my sprite library functions, after a bit of development I decided I did want the library and tried to include it so some sections are using lists of my sprite type and other sections are using array handles to the sprite items. Bad coder. Bad. <slaps self on face>