function assertf(bool, ...) if bool then return end local args = {...} local assertmsg = args[1] or "Assetion failed" table.remove(args,1) error(string.format(assertmsg, table.unpack(args)),2) end