im trying to...

Blitz3D Forums/Blitz3D Beginners Area/im trying to...

Well I'm trying to do this:
if newfile is clicked (value 1)
then if filein doesnt exist create temp.dat
else
delete temp.dat
and create temp.dat
closefile

How should I do it?
this shouldnt be to hard im guessing


  If newfile = 1 Then
	  
	  If Not ReadFile (filein) = 0 Then
	      filein = WriteFile("temp.dat")
	     CloseFile( filein )
	    newfile = 0
	  EndIf
	
	
	EndIf