OpenFile, do I use that if I create a file? or is the file assumed to be open?
Do i have to use openstream? What does open stream do and why is it a different command then openfile?
If I want to create a new file, do I use both openfile and openstream after I make it? or is the stream and file opened already?
If I want to write bytes to a file? Do I just use write bytes? Can I send variables like LastLevel,Score, etc into the file as bytes? Do they automatically know what is what when you open the file and read bytes?
Do you read bytes and THEN store the info? Or what? I'm so confused!
When you close the file does it change the data in the file? how do you re-write bytes if you have to? Do you jut use variables or is it some tricky position in file thing?
Thanks guys, I'm totally lost and I appreciate the help!!
If I know how to use these commands in the order they're used and use them right then I can open a few files for highscores and player data and configurations for the game. I'm assuming all I need to do is open the file then open a stream or not a stream and then load bytes some how (for next loop?) and then use the data to set variables in the game so its loaded or something. I dunno.. I'm lost :O - the problem is I dont know how it works.. like how does it know what byte to look at? can you store strings, integers, floats etc into 1 bytte? or do you have to use multiple bytes for what it is? if so then how do you know which bytes to load when youre reading the file? stuff like that.. ya know.. I'm just a little confused and need some clearing up!!
Thanks :)
Do i have to use openstream? What does open stream do and why is it a different command then openfile?
If I want to create a new file, do I use both openfile and openstream after I make it? or is the stream and file opened already?
If I want to write bytes to a file? Do I just use write bytes? Can I send variables like LastLevel,Score, etc into the file as bytes? Do they automatically know what is what when you open the file and read bytes?
Do you read bytes and THEN store the info? Or what? I'm so confused!
When you close the file does it change the data in the file? how do you re-write bytes if you have to? Do you jut use variables or is it some tricky position in file thing?
Thanks guys, I'm totally lost and I appreciate the help!!
If I know how to use these commands in the order they're used and use them right then I can open a few files for highscores and player data and configurations for the game. I'm assuming all I need to do is open the file then open a stream or not a stream and then load bytes some how (for next loop?) and then use the data to set variables in the game so its loaded or something. I dunno.. I'm lost :O - the problem is I dont know how it works.. like how does it know what byte to look at? can you store strings, integers, floats etc into 1 bytte? or do you have to use multiple bytes for what it is? if so then how do you know which bytes to load when youre reading the file? stuff like that.. ya know.. I'm just a little confused and need some clearing up!!
Thanks :)