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.

Author
Message
Sneaker
19
Years of Service
User Offline
Joined: 11th Apr 2005
Location:
Posted: 3rd Oct 2006 08:45 Edited at: 3rd Oct 2006 15:37
Hi!

Im [mod edit - don't post age] years old so if it is a Noob misstake i am not surprised

here is e function in my program
rem #################################################
function Delete(sak$,from,till)

for i=from to till

if sak$="sprite" then delete sprite i
if sak$="image" then delete image i
if sak$="animation" then delete animation i
if sak$="sound" then delete sound i
if sak$="music" then delete music i
if sak$="bitmap" then delete bitmap i

next i

endfunction

rem #####################################

if i write for example Delete("image",1,9) the images is not being deleted..... what is wrong ?!?!?!?
(i got 9 images when i delete them)
Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 3rd Oct 2006 17:09
I tested it, and it does work. Maybe you misunderstand that a image still exist because it still appears on the screen, when you actually never erased it from the screen. That once happened to me.
Or you might be setting in another part of your code some of the local variables as global.

Here i used you function and it worked fine, though i changed a bit the if statements so i don't get an error if i want to delete a non existing image.


Press 1 to reload all 5 images
Press 2 to delete the first 3 images
The numbers you see indace which images exist (1) and wich do not (0).

Hope it helps...

Further on my stuff at...
Sneaker
19
Years of Service
User Offline
Joined: 11th Apr 2005
Location:
Posted: 5th Oct 2006 15:46
Thanks =)

Login to post a reply

Server time is: 2024-09-25 09:36:35
Your offset time is: 2024-09-25 09:36:35