Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local files = {}
- function autoReload(fileName)
- files[fileName] = 0
- end
- function checkAutoReload()
- for k, v in pairs(files) do
- local t = file.Time(k, "LUA")
- if t then
- if files[k] != t then
- files[k] = t
- include(k)
- end
- else
- print("invalid file: ", k)
- files[k] = nil
- end
- end
- end
- timer.Create("checkAutoReload", 0.1, 0, checkAutoReload)
- autoReload("simploo/simploo.lua")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement