Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-11-10, 11:23 AM   #1
clam729
A Murloc Raider
Join Date: Oct 2005
Posts: 7
Similar to SELECT CASE in LUA ?

Hello all - new to LUA here and still working on my first addon. In VBS/VBA I can use SELECT CASE - is there an equivalent in LUA ?

For example, if I did this, how could I achieve the same results in LUA (snippet - missing all declares, etc. - I can do that fine in LUA) :

Select Case intQuestType
Case 0
strQuestType = "123"
Case 1
strQuestType = "456"
Case 2
strQuestType = "789"
Case Else
strQuestType = "ABC"
End Select

Would I just use a series of IF/ELSEIFs ?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Similar to SELECT CASE in LUA ?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off