10-25-2015, 07:04 PM
(This post was last modified: 10-25-2015, 07:21 PM by Seadragon91.)
(10-25-2015, 06:58 PM)NiLSPACE Wrote: You'll have to load the folder manually. Look at the WorldEdit plugin, i created a 'dofolder' function there.
Well I have my lua files already in folders and I load them all
Folders:
Code:
code
code/classes
code/commandsEdit: Code to load the files
function LoadLuaFiles()
local folders = { "/code", "/code/classes", "/code/commands" }
for _, folder in pairs(folders) do
local files = cFile:GetFolderContents(PLUGIN:GetLocalFolder() .. folder)
if (#files > 2) then
for _, file in pairs(files) do
if (string.sub(file, #file -3, #file) == ".lua") then
dofile(PLUGIN:GetLocalFolder() .. folder .. "/" .. file)
end
end
end
end
end

