Created
January 24, 2024 00:48
-
-
Save sl-service-account/da684a2af7cea9f6e0d090602ab56ffe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string NOTECARD_NAME = "notecard"; | |
key gLineCountId; | |
default { | |
state_entry() { | |
// Request number of notecard lines. | |
gLineCountId = llGetNumberOfNotecardLines(NOTECARD_NAME); | |
} | |
dataserver(key id, string data) { | |
if (id != gLineCountId) { return; } | |
integer count = (integer)data; | |
integer i; | |
for (i = 0; i < count; ++i) { | |
string line = llGetNotecardLineSync(NOTECARD_NAME, i); | |
if (line == EOF) { | |
llOwnerSay("---EOF---"); | |
} | |
else if (line == NAK) { | |
llOwnerSay("---NAK---"); | |
} | |
else { | |
llOwnerSay(line); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment