View Single Post
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