Blitzmax vs Blitzplus filehandling.
BlitzMax Forums/BlitzMax Programming/Blitzmax vs Blitzplus filehandling.
| ||
Hello, got some problems loading a old file saved with blitzplus. How do blitzmax handle strings vs blitzplus? I use 'Readline' command,and I don't get the right data from the file. |
| ||
ok, have a fix for it:Function RString:String(r:TStream) Local size:Int = r.ReadInt() Return r.ReadString(size) End Function |
| ||
Readline grabs a line until it gets a new line character. It doesn't work well with binary ie non-plain text files. What is the format of the file? |
| ||
Well its a mix of string/int/bytes in the same file, a custom format. Blitzplus and Blitzmax is using different setups when saving strings to a file, so thats why it didn't work without my 'converter' function(see my other post). But maybe blitzmax already have that function build in to it? another command then 'Readline'? |
| ||
What data does readline give you? A whole string or a string followed by other data? When writing the file, do you add any new line characters? |