Hello fellow developers, I was wondering if anyone could help me with my module loader.
I wondered if there is a way to round up how many modules were “started” and how many failed to start. For example, the console would print “17/19 modules loaded”, if 2 we’re unable to load, and 19/19 modules if all we’re loaded.
local modules = PATH_TO_MODULES:GetChildren()
local totalAmount = #modules -- yes you can do that to find the length of table
local loaded = {} -- or local loaded = 0
local function loadModules() --Whatever you do that
--After module is loaded, you just put it in "loaded" table or increase the value
end
local totalLoaded = #loaded
print(`{totalLoaded } of {totalAmount} Is Loaded`)