Talk:If

From Second Life Wiki
Revision as of 00:47, 19 January 2008 by Kaiden Ruxton (talk | contribs) (suggestion for addition to if() statement article.)
Jump to navigation Jump to search

I would appreciate an example that shows the appropriate "if / elseif / else" construction. I assume that this will work:

 if (a == "Loren") {
   llSay(0, "Lorem ipsum sic amet!");
 } else if (a == "Bob") {
   llSay(0, "Babble dabble rabble rouse.");
 } else {
   llSay(0, "Gobbledygook?  or English?");
 }

- Kendown Baroque 12:12, 29 August 2007 (PDT)



This page is missing documentation on one of the major flaws of the LSL if() else() statement. When writing an if() else(), residents need to know that there is a limit of 23 else() statements (not including the first if() statement). Further documentation of this limitation including a workaround can be found in the if() statement article at http://rpgstats.com/wiki/index.php?=Ifelse . I would add this documentation myself but I'm not sure how or where in the article to add it.

Kaiden Ruxton 23:47, 18 January 2008 (PST)