Im trying to get a script to read a notecard when touched by the owner. The touch filtering is no problem, reading a line of the notecard is no problem, reading all 5 lines is no problem.
Assigning each line to a seperate string however....bit of a problem.
This is fairly hacked up job of the example in the wikki.
and it constantly repeats after it is started.
any help is greatly appreciated!
Thank you
tucor
key kQuery;
integer iLine = 0;
string one;
string two;
string three;
string four;
string five;
default {
state_entry() {
kQuery = llGetNotecardLine("notecard", iLine);
//llSay(0,(string)kQuery);
}
dataserver(key query_id, string data) {
if (query_id == kQuery) {
if (data == EOF) {
llSay(0, "No more lines in notecard, read " + (string)iLine + " lines."
;} else {
// increment line count
llSay(0, "Line " + (string)iLine + ": " + data);
if(iLine=0){one=data;}
if(iLine=1){two=data;}
if(iLine=2){three=data;}
if(iLine=3){four=data;}
if(iLine=4){five=data;}
iLine++;
kQuery = llGetNotecardLine("notecard", iLine); // read another line when you can
}
llSay(0," "+one+two+three+four+five);
}
}
}
