Forum

> > CS2D > General > freeimage problems
Forums overviewCS2D overviewGeneral overviewLog in to reply

English freeimage problems

1 reply
To the start Previous 1 Next To the start

old freeimage problems

wups
User Off Offline

Quote
I post it here because that the lab doesn't work.


When i using 2 images on the player.
I can't free the images.


This code works perfect too use 2 images

1
2
3
image(pic,1,0,200+p)
id=image(pic2,1,0,200+p)
imagecolor(id,255,0,0)

But if i want too free all images, it's only removes the first image.
If i write freeimage(id). It doesn't remove the other image.




But if i use this code, it will fails and give all the images red color.
But i can free all images from that player.


1
2
3
image(pic,1,0,200+p)
image(pic2,1,0,200+p)
imagecolor(p,255,0,0)

So how can i fix this the easiest way, do i need too use arrays?

old Re: freeimage problems

Flacko
User Off Offline

Quote
You will have to use arrays.
The variable is just a number value that holds the id of the image.
for example
1
imageid=image("path",0,0,0)
Then, image will equal something like 1, since it returns the id of the image. Or atleast that's how I would have implemented it...
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview