mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 05:56:02 +01:00
fix inventory config loading if vector4 is present
This commit is contained in:
@@ -320,12 +320,19 @@ local function getInventoryConfig(resource, data)
|
|||||||
if not content then return nil, "Failed to load file" end
|
if not content then return nil, "Failed to load file" end
|
||||||
|
|
||||||
local env = {
|
local env = {
|
||||||
GetConvar = GetConvar, vector3 = vector3, Citizen = Citizen,
|
GetConvar = GetConvar,
|
||||||
GetResourceState = GetResourceState, exports = exports,
|
vector3 = vector3,
|
||||||
DependencyCheck = DependencyCheck or function() return nil end,
|
vector4 = vector4,
|
||||||
|
Citizen = Citizen,
|
||||||
|
GetResourceState = GetResourceState,
|
||||||
|
exports = exports,
|
||||||
|
DependencyCheck = function() return nil end,
|
||||||
}
|
}
|
||||||
|
|
||||||
local fn, err = load(content, '@'..data.file, 't', env)
|
local fn, err = load(content, '@'..data.file, 't', env)
|
||||||
|
--local success, err = xpcall(fn, function(e)
|
||||||
|
-- print(debug.traceback("Error while executing qs-inventory config:\n" .. tostring(e), 2))
|
||||||
|
--end)
|
||||||
if not fn then return nil, "Failed to compile config: " .. err end
|
if not fn then return nil, "Failed to compile config: " .. err end
|
||||||
if not pcall(fn) then return nil, "Error executing config file" end
|
if not pcall(fn) then return nil, "Error executing config file" end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user