ENAy: in your code you're asking it to read a string of length 0 bytes
Global intget:Int '0
Any reason you can't use WriteLine() & ReadLine() instead, then you won't have to store sizes.
Global intget:Int '0
Strict Graphics 640,480,0 Global fileout = WriteFile("moo.txt") WriteString(fileout, "ARSE") CloseFile(fileout) Global wib:String Global intget:Int=FileSize("moo.txt") Global filein = ReadFile("moo.txt") 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
Any reason you can't use WriteLine() & ReadLine() instead, then you won't have to store sizes.