View Single Post
  #4  
Old 12-11-2005, 08:34 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by Yen
PHP Code:
object.loadvars(path); 
members.loadvars("levels/blah/something.txt");

--CONTENTS OF SOMETHING.TXT--
stuff=3
arf=8
hello="Hi there!"
omg=Yellow,Blue,Red

members.stuff would be 3
members.arf would be 8
members.hellow would be 'Hi there!'
members.omg would be an array containing 'Yellow,' 'Blue,' and 'Red.'

You can get the list of variables it loaded with object.getstringkeys("members");
I don't recall if you need a . after members or not. :/
There's a way to load textfiles without blah=blah in it too, I just can't remember off the top of my head how to do it

This post should have been in the GScript2 sub-forum, though.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote