1326 posts
Location
Error 404: Could not find.
Posted 15 May 2014 - 12:19 AM
I want to know if it is possible to make a program read multiple lines and set multiple variables.
Ex:
Spoiler
Line 1:Read This line and set variable x
Line 2:Read this line and set variable y
32 posts
Posted 15 May 2014 - 12:26 AM
If you're looking to make a configuration file there was a post 3 days ago that addressed the same issue. TheOriginalBIT has an API called ccConfig in his thread
here.
If you want to work on one yourself look at the
FS API. You would open the file for reading, then read in each line at a time. Then use some kind of string parsing to separate the name from the value.
1326 posts
Location
Error 404: Could not find.
Posted 28 May 2014 - 04:34 PM
Found out how just a few days ago.
Pie = fs.open( "lol", "r" )
Pie.readLine(1)
Pie.readLine(2)