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.