localfunction mem1()
print("menu 1")endlocalfunction mem2()
print("menu 2")end-- Is there a better way to write this?-- I mostly don't wanna use elseif each time I add a string on line 11 (gg.choice({'A', 'B', 'C', 'D'})local choice = gg.choice({'A','B','C','D'})if(choice ==1)then
mem1()elseif(choice ==2)then
mem2()end
Is there a better way to write this? It's a hassle always changing the number in the "elseif" statement every time I add a string, something to make this automatic would be nice.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Question
PMT_Ives
Is there a better way to write this? It's a hassle always changing the number in the "elseif" statement every time I add a string, something to make this automatic would be nice.
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.