forums

TNT Basic Forums > Bugs!
delete file bug
< Last Thread     Next Thread >
Author
Thread        Post A Reply

04-05-2004 23:52

Posted by:
kemalyun

Location:
Frankfurt/Germany

Find more posts by kemalyun

How can this code

if file exists("highscore.dat")
delete file "highscore.dat"
end if

ever create an error?

It gives me a "could not delete file".
Facts:

- The file "highscore.dat" exists
- On one Mac, the file type in finder is shown as "document". On this mac it works.
- On another one, the file type is shown as ".... (my app name) built document". On this mac it creates the error message.
- Both macs run the same OS (9.2.2.) and the same tnt-program.
- Finder says the file is not write-protected.
- The file is beeing created before by the same TNT-program.
- There are no other lines of code between the above given code-lines.

So what's wrong here?

04-06-2004 01:36

Posted by:
DanLurie

Location:
Earth>USA>New Jersey>Clifton>My Chair

Click Here to Email DanLurie   Find more posts by DanLurie

Did you close the file first? Maybe TNT still has it open when you try to delete it?

04-06-2004 13:02

Posted by:
kemalyun

Location:
Frankfurt/Germany

Find more posts by kemalyun

File closed

Yes, the file is closed. The same happens when I just put a simpletext-file with the same name in the folder, it also can't delete that one. I've sent an email with a sample folder to Mark, let's see if he can work it out.

Unfortunately that file deletion is neccesary in order to save the highscorelist ...

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.