View Single Post
  #7  
Old 09-12-2006, 10:01 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Yen
Yay for wasting my post.

I don't know what you mean by 'directly accessing a file.'
It's possible to load the file as raw text, the way it would appear in wordpad, by using loadlines() and savelines().

All of the 'save<whatever>' functions require a full path. The syntax is save<whatever>(path,append?)
If you want to save text to a file 'zomg.txt' in levels/, you need to do object.savelines("levels/zomg.txt",false);

In the case of savelines, it expects the object to be an array. Each array member is one line.
PHP Code:
temp.lines = {"Hi","how","are","you"};
temp.lines.savelines("levels/test.txt",false);
// Output will look like:
// Hi
// how
// are
// you 
Ahh, thats what I ment** My bad =(
Reply With Quote