View Single Post
Old 25 March 2013, 00:44   #7
Ze Emulatron
Registered User
 
Join Date: Nov 2010
Location: Invercargill, New Zealand
Posts: 176
Question

In Blitz Basic you can open a file for writing with

If OpenFile(0,"test")

This works fine when the disk is write enabled, when the disk is write protected in AMIGA mode it pops up a system request saying the disk is write protected retry cancel, but in BLITZ mode it freezes at that point in the program. I tried to use CatchDosErrs, but didn't know how to implement it when I have 2 bitmaps and 2 coplists on the screen, the example code in the Blitz 2 reference guide uses Screens.

I tried to use an if else,
If OpenFile(0,"test") = 0

else

end if

or

If OpenFile(0,"test") = -1

else

end if

but it still froze at the same part of the program.


Does someone know some code I can use in Blitz to check if the disk is write protected ?

Last edited by Ze Emulatron; 25 March 2013 at 02:02.
Ze Emulatron is offline  
 
Page generated in 0.05274 seconds with 11 queries