Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / function free_image()

Author
Message
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 1st Apr 2017 18:59

why free_image() don't work in my project?

Attachments

Login to view attachments
damothegreat
User Banned
Posted: 1st Apr 2017 19:07
Uh..

Not sure what your trying to do here, but as far as I can see

image_id

is not an image yet its just a normal value!!

getimagexist() looks for images using loadimage() or createimagefrommemblock() commands

Damo



pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 1st Apr 2017 20:07


from this code

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Apr 2017 00:01 Edited at: 2nd Apr 2017 04:27
If you don't pass an id to LoadImage() it will assign it the next available image id and return that.
sun_image_id = LoadImage ( "sun.jpg" )
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 2nd Apr 2017 06:11
When one object is loaded, for example, it works.
When 2 objects load - does not work.



See for yourself
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Apr 2017 07:31
You should use the method that BlinkOK demonstrated:



This will allocate a free image number automatically. Is there a specific reason why you are not doing it this way?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 2nd Apr 2017 07:42
Many thanks to all.
I found a mistake.
Your advice I will take note.
I forgot to create the object itself.
But the automatic assignment of images or textures is very convenient.

Login to post a reply

Server time is: 2024-11-24 16:51:33
Your offset time is: 2024-11-24 16:51:33