Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Dataserver data string

Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
09-28-2005 06:21
Is the size of the string returned from a dataserver event limited by anything other than memory? I can go and do the tests, but I'd rather pick brains if someone's already done it for me.

What happens if I try to read a notecard line (say) that's longer than available memory, I'm guessing a stack collision type error, but again does anyone know?
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
09-28-2005 18:34
I tried this with a notecard line 20,000 characters long (I was wondering about this anyways), and I found that it truncates it to 255 characters. Interesting... But this is nice, because we don't have to worry about big notecards messing up our scripts.

My little test script:
CODE

default
{
state_entry()
{
llGetNotecardLine( "test", 0 );
}

dataserver( key id, string data )
{
llOwnerSay(data);
llOwnerSay((string)llStringLength(data));
}
}


The notecard "test" contained 20,000 characters of random junk.

Dang... I just looked on the wiki, and it says,
"Note that lines longer than 255 characters will be truncated without any indication that this has been done."

What a waste of time :P