Metaphysical save text file problems

Blitz3D Forums/Blitz3D Programming/Metaphysical save text file problems

GrumpyOldMan(Posted 2007) [#1]
Hi All

I've been saving figures out to Milkshape ASCII format and everything is being written out beautifully and correctly. Try to load in Milkshape and an error comes up. Load the text file in notepad, save and close. Go back to Milkshape and it opens wonderfully well. From the original program, I've tried all the permutations of filetype, closefile, openfile, readline, closedir, etc - however it keeps telling me that the file doesn't exist from Blitz3d (filetype = 0, but it can tell me how big the nonexistent file is ????

Anybody else ever come across this problem??? Any solutions???

Cheers

GrumpyOldMan


jfk EO-11110(Posted 2007) [#2]
This is really spooky. Does it happen with a certain filename only?

(Cause, if you try to create a file with a name that is a msdos device, like CON or so then there may be problems as well)


GrumpyOldMan(Posted 2007) [#3]
Hi jfk

I agree this is really spooky, no there is nothing like a msdos device, the files have names like 'pikeman_lod0.txt', the properties of the files show nothing unusual, like hidden or archived. This happens with any Milkshape ascii file that I save over a range of different file names. I've done a hex comparison with a file saved by Blitz and one opened and saved in Notepad - no difference. I'm thinking of getting the exorcist in :).

Cheers

GrumpyOldMan


puki(Posted 2007) [#4]
Any further updates? This thread is potentially exciting.


jfk EO-11110(Posted 2007) [#5]
One of those "Mulder, watch this" files. Maybe it has something to do with the state of milkshape, are the files still missing when you close Milkshape? What happens if you zip it and then unzip it again? Or maybe it's locked somehow? (try an unlocker utility)


jfk EO-11110(Posted 2007) [#6]
Just tried this: imported a 3ds furniture mesh in Milkshape 1.6.5. Then I exported it as Milkshape ascii .txt. In Blitz3d FileType("test_milkshape_bug.txt") does return 1.

What version are you using?


b32(Posted 2007) [#7]
I think it's the other way around, exporting Ascii files from Blitz to Milkshape?
The non-existing file problem could be caused by a locked file indeed. Maybe after an error, Milkshape doesn't close the file properly.
The conversion problem could be caused by the line breaks being different ? I believe Notepad converts them automatically.


GrumpyOldMan(Posted 2007) [#8]
Hi jfk

Sorry I should have made it clear, I was writing and saving the file from Blitz. Incidentally I'm using Milkshape 1.8 with the new vertex weighting (drop a note to Mete to update the b3d plugin and ascii format :) ).

In windows explorer the file is visible, has no unusual properties and will open in Notepad. If, in the same Blitz3d program I write the text file in, I closefile and openfile, filetype comes up as 0 but I can get the size of the file ????. Milkshape (version 1.7.5 through to 1.8) will refuse to accept ('Error Importing Milkshape ASCII File' type error) the text file until it has been opened and saved in Notepad.

ASCII files saved from Milkshape have no problems being opened, have run them and mine through text and binary file compare utilities - zip, none, nada differences!! Possibly something with the way Blitz opens writes and closes text files???????

Cheers

GrumpyOldMan

Seriously weird.

Cheers

GrumpyOldMan


GrumpyOldMan(Posted 2007) [#9]
Hi b32

That's a good lead about the line breaks, I'll follow it up with Mete at Milkshape.

Cheers

GrumpyOldMan


GrumpyOldMan(Posted 2007) [#10]
Hi All

Stand easy, I was looking through my lumpy code and I was saving a zero terminated string as is, with the 0 as '00' rather than '20' Dohh!!!

Cheers

GrumpyOldMan