Quote:
Originally Posted by iBeatz
Now that I've asked that question, I may as well ask this one..
How would you go about loading the contents of one of those script files?
|
This can apply to nearly every kind of file on your server not just the text files in the scripts folder.
As Array of Lines:
PHP Code:
temp.folder = "scripts/";
temp.filename = "your_class.txt";
temp.lines.loadlines(temp.folder @ temp.filename);
for (temp.line: temp.lines) {
// processes line by line
}
As String:
PHP Code:
temp.folder = "scripts/";
temp.filename = "your_class.txt";
temp.data.loadstring(temp.folder @ temp.filename);
for (temp.i = 0; temp.i < temp.data.length(); temp.i++) {
// process each character
temp.c = temp.data[temp.i];
}