View Single Post
  #6  
Old 05-29-2011, 05:03 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by iBeatz View Post
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.linetemp.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.0temp.temp.data.length(); temp.i++) {
  
// process each character
  
temp.temp.data[temp.i];

__________________
Quote:
Reply With Quote