string EOF
This is a constant passed to the
dataserver event, when any lines past the end of a
notecard are read. Notecards are read using
llGetNotecardLine.
EOF is a string that contains three newline ("\n") characters.
integer position;
string notecard = "notecard_name"
key query;
default
{
state_entry()
{
if(llGetInventoryType(notecard) == INVENTORY_NOTECARD)
query = llGetNotecardLine(notecard, position);
else
llOwnerSay(notecard + " is not a notecard in the object's inventory.");
}
dataserver(key request, string data)
{
if(query == request)
{
if(data == EOF)
{
//End of notecard!
}
else
{
//Do something with the data
//Increase the position variable and
++position;
//Continue reading the next lines.
query = llGetNotecardLine(notecard, position);
}
}
}
}
Constants |
dataserver |
llGetNotecardLine