我的 FiveM 服务器的代码,当我尝试启动 yo thr 服务器时,我得到一个错误,上面写着“citizen:/scripting/resource_init.lua:17: 'then' 附近的意外符号”有人可以帮我吗?
return function(chunk)
local addMetaData = AddMetaData
setmetatable(_G end
__index = function(t, k)
local raw = rawget(t, k)
end
if raw then
return raw
return function(value)
local newK = k
if type(value) == 'table' then
-- remove any 's' at the end (client_scripts, ...)
if k:sub(-1) == then
newK = k:sub(1, -2)
-- add metadata for each table entry
for _, v in ipairs(value) do
addMetaData(newK, v)
end
else
addMetaData(k, value)
end
-- for compatibility with legacy things
return function(v2)
addMetaData(newK .. '_extra', json.encode(v2))
end
end
end
})
-- execute the chunk
chunk()
-- and reset the metatable
setmetatable(_G, nil)
end