Dataserver/ja
From Second Life Wiki
メインページ > Dataserver > Dataserver/ja
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
例
key kQuery;
integer iLine = 0;
default {
state_entry() {
llSay(0, "Reading notecard...");
kQuery = llGetNotecardLine("My Notecard", iLine);
}
dataserver(key query_id, string data) {
if (query_id == kQuery) {
// this is a line of our notecard
if (data == EOF) {
llSay(0, "No more lines in notecard, read " + (string)iLine + " lines.");
} else {
// increment line count
llSay(0, "Line " + (string)iLine + ": " + data);
//request next line
++iLine;
kQuery = llGetNotecardLine("My Notecard", iLine);
}
}
}
}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

