Posted 17 February 2013 - 01:25 AM
Okay, so I have been playing around with the file handling API recently for a project and can't for the life of me figure out two things, before you say google it or anything, I have I still don't get this.
Question 1: When you are working with programs that have multiple lines, is it possible to read specific lines, or do I have to make a code to turn the file into a table and return specific table items.
Just as an example to help with your understanding of what I mean the file is a config file and looks something like this;
etc etc.
I have been trying to read just the lines that have configoption on them. But to no prevail.
This actually leads into my second question.
Question 2: Is it possible to put a whole program into a table that can be sent via a rednet message, or as I have seen someone say before there is a limit to how big a rednet message can be, does this limit actually affect a table?
Thanks to anyone who can help, there is code avaliable but its not much. Just some failed attempts at trying to read the specific lines etc.
Question 1: When you are working with programs that have multiple lines, is it possible to read specific lines, or do I have to make a code to turn the file into a table and return specific table items.
Just as an example to help with your understanding of what I mean the file is a config file and looks something like this;
--name of project
--config option 1
configoption
--config option 2
configoption
--config option 3
configoption
etc etc.
I have been trying to read just the lines that have configoption on them. But to no prevail.
This actually leads into my second question.
Question 2: Is it possible to put a whole program into a table that can be sent via a rednet message, or as I have seen someone say before there is a limit to how big a rednet message can be, does this limit actually affect a table?
Thanks to anyone who can help, there is code avaliable but its not much. Just some failed attempts at trying to read the specific lines etc.