Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tableLength(T)
- local count = 0
- for _ in pairs(T) do
- count = count + 1
- end
- return count
- end
- function split(s, delimiter)
- result = {}
- for match in (s..delimiter):gmatch("(.-)"..delimiter) do
- table.insert(result, match)
- end
- return result
- end
- function commandVerif(args, nbArgs, command)
- if #args ~= nbArgs then
- print("Le nombre d'argument n'est pas correct. " .. command)
- local text = "Il y'a " .. #args .. " arguments.\n Les arguments sont : "
- term.setTextColor(colors.yellow)
- for i = 1, #args do
- text = text .. "\"" .. args[i] .. "\"" .. " "
- end
- print(text)
- return false
- else
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement