Skip to content

Instantly share code, notes, and snippets.

@Codinablack
Forked from Zbizu/fileDir.lua
Created January 19, 2022 19:03
Show Gist options
  • Save Codinablack/b2b39a61f4b1651a4e4b02f146a6bea9 to your computer and use it in GitHub Desktop.
Save Codinablack/b2b39a61f4b1651a4e4b02f146a6bea9 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