Quest "file" command?
DarkLizerd
18 Apr 2017, 17:10Is 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
18 Apr 2017, 17:12GetFileData
will get the contents of a named file, but no write function.
DarkLizerd
19 Apr 2017, 02:54Thanks... I'll check that out...
Read is better than nothing...
DarkLizerd
19 Apr 2017, 03:29But how is it used?
Is it like get input and the file info is in result?
DarkLizerd
19 Apr 2017, 05:47Looks 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
19 Apr 2017, 07:01I 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.