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.
sync on
sync rate 60
load(1,5)
do
if keystate(2)=1 then load(1,5)
if keystate(3)=1 then delete("image",1,3)
prt(1,5)
sync
loop
function load(a,b)
for i=a to b
if image exist(i)=0 then load image "E:\DBPro\Temp\cursor.png",i
next i
endfunction
function prt(a,b)
cls
for i=a to b
print image exist(i)
next i
endfunction
function Delete(sak$,from,till)
for i=from to till
if sak$="sprite" and sprite exist(i) then delete sprite i
if sak$="image" and image exist(i) then delete image i
if sak$="animation" and animation exist(i) then delete animation i
if sak$="sound" and sound exist(i) then delete sound i
if sak$="music" and music exist(i) then delete music i
if sak$="bitmap" and bitmap exist(i) then delete bitmap i
next i
endfunction
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...