Thread: player.loadvars
View Single Post
  #3  
Old 04-14-2009, 08:16 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Loadvars is trying to do exactly what it states -- loading variables.
Quote:
Script help for 'loadvars':
TGraalVar.loadvars(str) - loads the variables from a file where each line has the format varname=value
for example, in the textfile you may have:
test=foo
test2=bar

then,

PHP Code:
temp.notes.loadvars("Notes/"@player.account@".txt");
Notes_note.text temp.notes.test
this would display "foo" in the GUI.


for what you're trying to do you might want to check out loadlines().
It will return the lines of the text file as an array, so in your case, it would return the array {"This is a test.", "To show how it fails."}
Reply With Quote