View Full Version : Is there a file read/write function?
FredThompson
6th July 2003, 23:22
Is there a function which supports file operations?
I'm looking for a way to make scripts data-driven. One way to do this would be to feed a function a data file name and index value. The function woule open the file, read until it hits the index value, and return the variables from the rest of the line.
Wilbert
7th July 2003, 09:38
Maybe the call (http://forum.doom9.org/showthread.php?s=&threadid=46506) plugin can help you. Plugin can be found at WarpEnterprise's page (I guess) ...
FredThompson
7th July 2003, 10:14
That's a little different but thanks for the idea. Call would be to launch an external program. I'm looking to read/write variables to/from a data file.
Wilbert
7th July 2003, 10:25
Did you actually read the whole thread?
FredThompson
7th July 2003, 10:39
I have now, sheepishly. Looking at the first page and the linked zip it looks like the common use of call meaning a way to launch an external program similar to a commandline command. Page 2 talks about more direct access. As I continue to read it's becoming apparent what I'd like to do isn't possible. Durn it.
The idea was to create a script such that it would open one file to get an offset then read from a second until it hits the key value then load variables. Finally, it would replace the contents of the first file with a new index value, read as the last argument of the data line of file 2. The idea was to create a self-modifying loop structure. Just like DDogg in the thread I was thinking like a programmer. Durn.
Take a look at this thread:
http://forum.doom9.org/showthread.php?s=&threadid=53527
Bilu
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.