|
Kex Godel
Master Slacker
Join date: 14 Nov 2003
Posts: 869
|
03-26-2004 10:14
Can anything think of a reason why the system can't truncate our messages sent with llSay(), llWhisper() and llShout() to 255 characters instead of harshly having a script run-time error?
|
|
Hank Ramos
Lifetime Scripter
Join date: 15 Nov 2003
Posts: 2,328
|
03-26-2004 10:16
<joke> Oversight, maybe?  </joke>
|
|
Michael Small
Addicted To Counseling
Join date: 22 Sep 2003
Posts: 123
|
03-26-2004 10:19
I second that the chat be truncated. The only reason I can fathom why they implemented this is kinda far-reaching. Maybe they figured that if the scripter saw the >255 char llSay call execute w/o error they would assume it worked, and wouldn't realize it truncated until they saw unexpected behavior in their application. Let's just truncate the text 
_____________________
I don't play, but I still read the forums.
The new layout sucks.
|
|
Kex Godel
Master Slacker
Join date: 14 Nov 2003
Posts: 869
|
03-26-2004 10:34
It does seem strange, since most of the built-in functions fail gracefully, except this one =)
|
|
Hank Ramos
Lifetime Scripter
Join date: 15 Nov 2003
Posts: 2,328
|
03-26-2004 10:57
I'd like to see an event for handling errors. That way, errors can be raised and either handled by the scripter, or shown to the world via chat. try/except/finally blocks would be even better, and preferred  But, for this particular error, I agree with Kex and Michael: simply truncating the output without an error would be the best behaviour.
|
|
Tcoz Bach
Tyrell Victim
Join date: 10 Dec 2002
Posts: 973
|
03-29-2004 10:11
Exception handling would be huge, and is an old request. Exceptions wouldn't even have to be specific; just "if any error at all occurs let me handle it". However, some form of llGetErrorMessage or something would be great.
I wrote a function that actually does check for chat overruns, the problem is though, the font used in chat is non proportional. So, for instance, you can fit lots and lots of "." chars, but not nearly as many "W" or "X" chars. So what I ended up doing was assuming the worst case, which would be a spoken string of capital Ws, which means I can get about 250ish chars in chat before an overrun. So you take your string to be spoken, and if it's greater than 250ish chars, truncate it, then submit it to llSay(). If the font was proportional I wouldn't have to bother with the worst case, but well there ya go.
_____________________
** ...you want to do WHAT with that cube? **
|
|
Kyrah Abattoir
cruelty delight
Join date: 4 Jun 2004
Posts: 2,786
|
08-25-2004 17:38
wouldnt it be much simpler if all lsl function return q vqlue depending if they succed or failed? linstead of having: llGiveinventory(foo bar) integer(llGiveInventory(foo bar) so i could use nice code like if (llGiveInventory(target,"myobject"  ) { llWhisper(0,"success"  } else { llInstantMessage(llGetOwner(),"an error occured"  ; }
|