Skip to content

Instantly share code, notes, and snippets.

@Zbizu
Created September 19, 2021 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Zbizu/4ea116c0eddcb5b8ab8824caa5514daf to your computer and use it in GitHub Desktop.
Save Zbizu/4ea116c0eddcb5b8ab8824caa5514daf to your computer and use it in GitHub Desktop.
Get current script directory
--[[
dumps file directory to a console
example output:
linedefined 0
lastlinedefined 207
source @F:\ot\data\scripts\filename.lua
what main
short_src ...ot\data\scripts\filename.lua
]]
local str = debug.getinfo(1,'S')
function dumpTable_loop(str)
for k, v in pairs(s) do
print(k, v)
end
end
addEvent(dumpTable_loop, 3000, str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment