YouGroove Posted August 10, 2013 Share Posted August 10, 2013 if (stream) then stream:WriteLine("Hello!") stream:Release() end In this example, the test if(steam) don't work. I tried if(stream ~= nil) not work. I just put directly writeLine and it works. So there is no way to detect if the file to create exists and is ready ot write ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
josk Posted August 10, 2013 Share Posted August 10, 2013 I used the following for a high score table. local path = "MyFile.txt" local stream = FileSystem:OpenFile(path) if (stream) then stream:WriteFloat(HighScore) stream:Seek(0) stream:Release() end Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
YouGroove Posted August 10, 2013 Author Share Posted August 10, 2013 Thanks. if (stream) returns true and works for you. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.