ZTzTopiaa Posted April 20, 2019 Share Posted April 20, 2019 code1 = 1 code2 = 2 code3 = 3 code4 = 4 code5 = 5 code6 = 6 code1 = co6 code2 = cop7 code3 = c8 code4 = co8 code5 = cod8 code6 = co109 wrong xd Spoiler Spoiler Spoiler ignore code1 = co6, code2 = cop7 i cant delete heheh How to make code1 - 6 short? WTF Link to comment Share on other sites More sharing options...
CmP Posted April 20, 2019 Share Posted April 20, 2019 Use tables and loops. For example, creating array-like table with 6 elements where values are equal to keys: local t = {} for i = 1, 6 do t[i] = i end Then you can access it's elements by their key, like this: print(t[4]) -- prints "4" Link to comment Share on other sites More sharing options...
ZTzTopiaa Posted April 21, 2019 Author Share Posted April 21, 2019 10 hours ago, CmP said: Use tables and loops. For example, creating array-like table with 6 elements where values are equal to keys: local t = {} for i = 1, 6 do t[i] = i end Then you can access it's elements by their key, like this: print(t[4]) -- prints "4" THX YOU Link to comment Share on other sites More sharing options...
Question
ZTzTopiaa
code1 = co6 code2 = cop7 code3 = c8 code4 = co8 code5 = cod8 code6 = co109 wrong xd
ignore code1 = co6, code2 = cop7 i cant delete heheh
How to make code1 - 6 short?
WTF
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.