Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- * load an external script file if the file exists! * --
- function loadScripts()
- local f, cerror
- f, cerror = loadfile('./folder_name/script_name.lua') -- replace folder_name & script_name with whatever you called your folders & script!
- if f == nil then -- checks if file exists!
- print('cerror: ' .. cerror) -- prints error reason to the log file!
- else
- print('External script(s) have been successfully loaded!')
- f()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment