love.filesystem.getDirectoryItems("SimpleElementSystem.Systems")
Posted: Mon May 11, 2020 6:11 pm
Hey there can you may help me ? For some reason i can't read the file and it doesnt print love
best regards
Michael
Code: Select all
local littlehelper = {}
function littlehelper.requireSystems()
local systemTable = {}
local systemName
for k, v in ipairs(love.filesystem.getDirectoryItems("SimpleElementSystem.Systems")) do
print("Love")
systemName = "SimpleElementSystem.Systems." .. v:gsub("%.lua", "")
table.insert(systemTable, require(systemName))
end
return systemTable --intendation of this return good ?
end
return littlehelper
Michael