Quest "file" command?

DarkLizerd

Is there one?
Now, for what I'm asking...
Is there a command in Quest that allows Quest to open and read, or write, local files?
Kinda like a save game command?
In Basic, I would...
To load player info...
Open "Player.txt" for input as #1
input #1, Player.Name
...
close #1
or
to save player info...
Open "Player.txt" for output as #2
print #2, Player.Name
...
close #2

Not to confuse this with "open door" and "close door"


The Pixie

GetFileData will get the contents of a named file, but no write function.


DarkLizerd

Thanks... I'll check that out...
Read is better than nothing...


DarkLizerd

But how is it used?
Is it like get input and the file info is in result?


DarkLizerd

Looks like the file is loaded into a variable
and if loaded into a split can provide the separate parts...
player.file = Split(GetFileData ("Player.txt"), ",")
And then the parts could be used that way...


The Pixie

I have a feeling you need to use it like this to ensure it works on-line:

player.file = Split(GetFileData (GetFileURL("Player.txt")), ",")

Also, on your PC the file name will be case insensitive; that may not be the case on-line.


Log in to post a reply.

Support

Forums