forums

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

07-20-2004 10:50

Posted by:
Fischgurkensenf

Location:
Bern, Switzerland

Click Here to Email Fischgurkensenf   Find more posts by Fischgurkensenf

run this code two times:


set directory system preferences

if not file exists("test_preferences")
int preffile=create file("test_preferences","Text","Text") : print"new file created"
else
int preffile=open file("test_preferences",true,"Text","Text")
'close file preffile
delete file "test_preferences"
print"deleted file"
end if


The second time I run it, I get this error message:

*** Runtime exception caught ***
Line# : 8
Code : delete file "test_preferences"
Error : Could not delete file.

Is this a bug??? If I look into my preferences folder, the file is there.

-IBD

07-22-2004 07:10

Posted by:
Wil Hostman

Find more posts by Wil Hostman

well, it's not because you commented out the close file...

I was able to replicate this, but only by switching to
set directory game

Until I did that, it hung at the creating file point...

(OSX....)

07-24-2004 09:30

Posted by:
Fischgurkensenf

Location:
Bern, Switzerland

Click Here to Email Fischgurkensenf   Find more posts by Fischgurkensenf

I'm using OS 9 for this code. If I delete a file that I didn't created it works fine...

07-26-2004 06:28

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

You're not the only one witht the problem:
http://www.tntbasic.com/community/forums/showthread.php?threadid=947
What version of TNT are you using?

07-26-2004 14:47

Posted by:
Fischgurkensenf

Location:
Bern, Switzerland

Click Here to Email Fischgurkensenf   Find more posts by Fischgurkensenf

I'm using TNT Basic 1.2 ...

01-29-2006 22:24

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

This is fixed in cvs and will be released in TB 1.31.

Mark

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.