Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------table compare by fat boy chummy--------
- local function t_eq(a, b, noflip)
- if type(a) ~= "table" or type(b) ~= "table" then
- return false, t_eq_error
- end
- for k, v in pairs(a) do
- if type(v) == "table" then
- if not t_eq(v, b[k]) then
- return false, t_eq_error
- end
- elseif v ~= b[k] then
- return false, t_eq_error
- end
- end
- if not noflip then
- return t_eq(b, a, true)
- end
- return true, ""
- end
- return {t_eq = t_eq}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement