Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local f = file.Open('diagnostic-dump.txt', 'w', 'DATA')
- local function dumpFunction(func)
- local info = debug.getinfo(func)
- local str = {}
- for i = 1, info.nparams do
- table.insert(str, "_")
- end
- if info.isvararg then
- table.insert(str, "...")
- end
- str = {(info.name or "unknown") .. "@"..(info.what or "unknown") .. "@" .. (info.short_src or "unknown"), "(", table.concat(str, ", "), ")"}
- return table.concat(str, "")
- end
- -- dump hook data
- f:Write("------------------\n")
- f:Write(" HOOK DATA DUMP \n")
- f:Write("------------------\n")
- for hookName, hooks in pairs(hook.GetTable()) do
- f:Write(hookName .. "\n")
- for id, func in pairs(hooks) do
- f:Write("\t" .. id .. " : " .. dumpFunction(func) .. "\n")
- end
- end
- -- dump a list of the installed addons
- f:Write("------------------\n")
- f:Write(" ADDON LIST DUMP \n")
- f:Write("------------------\n")
- do
- local files, dirs = file.Find("addons/*", "MOD")
- for
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement