Ok, I still don't fully understand Blitzmax strings.
Check out the code:-
If I read the string back, I get nothing at all, and then if I uncomment the line to read the int, the program hangs my machine.
Check out the code:-
Strict Graphics 640,480 Global fileout = WriteFile("moo.txt") WriteString(fileout, "ARSE") CloseFile(fileout) Global wib:String = "WIBBLE" Global intget:Int Global filein = ReadFile("moo.txt") 'intget = Readint(filein) wib = ReadString(filein, intget) CloseFile(filein) Repeat Cls SetColor 255,255,255 DrawText "TEST",0,0 If wib = "" Then DrawText "EMPTY", 50, 50 Else DrawText wib, 50, 50 EndIf Flip Until KeyDown(KEY_ESCAPE) End
If I read the string back, I get nothing at all, and then if I uncomment the line to read the int, the program hangs my machine.