Difference between revisions of "Talk:If"

From Second Life Wiki
Jump to navigation Jump to search
m (suggestion for addition to if() statement article.)
Line 17: Line 17:


[[User:Kaiden Ruxton|Kaiden Ruxton]] 23:47, 18 January 2008 (PST)
[[User:Kaiden Ruxton|Kaiden Ruxton]] 23:47, 18 January 2008 (PST)
:It looks like this limit is no longer in existence. i tested it with 50 else if and got a friend who tested about 120 without an error in LSL2 or mono. the connected jira {{jira|VWR-811}} is marked as resolved since about a week too. So the info can be removed?
:[[Image:Zai_signature.png|45px]] '''[[User:Zai Lynch|Lynch]]''' <sup><small>([[User talk:Zai Lynch|talk]]|[[Special:Contributions/Zai Lynch|contribs]])</small></sup> 03:20, 29 October 2008 (UTC)

Revision as of 19:20, 28 October 2008

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)

It looks like this limit is no longer in existence. i tested it with 50 else if and got a friend who tested about 120 without an error in LSL2 or mono. the connected jira VWR-811 is marked as resolved since about a week too. So the info can be removed?
Zai signature.png Lynch (talk|contribs) 03:20, 29 October 2008 (UTC)