Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commands = {}
- commands["first"] = {
- ["second"] = {
- ["third"] = "Output message"}}
- tbl = {}
- tbl[1] = "first"
- tbl[2] = "second"
- tbl[3] = "third"
- if type(commands[tbl[1]]) == "table" then
- if commands[tbl[1]][tbl[2]] ~= nil then
- if commands[tbl[1]][tbl[2]][tbl[3]] ~= nil then
- return processMessageHelper2( commands[tbl[1]][tbl[2]][tbl[3]] ) -- Wow, such shit!
- else
- return processMessageHelper2( commands[tbl[1]][tbl[2]] )
- end
- else
- return processMessageHelper2( commands[tbl[1]] )
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment