remove loader function, ensure files through fx
This commit is contained in:
1 parent
c7eca0285b
commit
11e7015672
20 files changed
+20
-25
No files matched your search
@@ -71,27 +71,3 @@ Config.Bzz = { -- if you have BZZZ props for these turn it on if you want
|
||||
shrooms = false,
|
||||
weed = false,
|
||||
}
|
||||
|
||||
|
||||
for k, v in pairs (Config.Drugs) do
|
||||
if not v then goto continue end
|
||||
local resourceName = 'md-drugs'
|
||||
local filePath = 'shared/DrugData/' .. k .. '.lua'
|
||||
local fullScript = LoadResourceFile(resourceName, filePath)
|
||||
if not fullScript then
|
||||
Bridge.Prints.Error("Error: Failed to load module '" .. filePath .. "' from resource '" .. resourceName .. "'.")
|
||||
return false
|
||||
end
|
||||
local chunk, err = load(fullScript, filePath, "t")
|
||||
if not chunk then
|
||||
Bridge.Prints.Error("Error loading Lua chunk from '" .. filePath .. "': " .. tostring(err))
|
||||
return false
|
||||
end
|
||||
|
||||
local success, execErr = pcall(chunk)
|
||||
if not success then
|
||||
Bridge.Prints.Error("Error executing Lua chunk from '" .. filePath .. "': " .. tostring(execErr))
|
||||
return false
|
||||
end
|
||||
::continue::
|
||||
end
|
||||
Reference in new issue
Block a user