【发布时间】:2021-02-26 08:10:18
【问题描述】:
尝试启动 Garry 的 Mod 服务器时出现错误:
[错误] gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:227: 尝试调用全局“玩家”(一个表值)
- 未知 - gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:227
sv_gamemode_functions.lua:217-230
函数 GM:EntityRemoved(ent)
self.Sandbox.EntityRemoved(self, ent) if ent:IsVehicle() then local found = ent:CPPIGetOwner() if IsValid(found) then found.Vehicles = found.Vehicles or 1 found.Vehicles = found.Vehicles - 1 end end local owner = ent.Getowning_ent and ent:Getowning_ent() or Player(ent.SID or 0) if ent.DarkRPItem and IsValid(owner) then owner:removeCustomEntity(ent.DarkRPItem) end if ent.isKeysOwnable and ent:isKeysOwnable() then ent:removeDoorData() end end
请帮忙。
【问题讨论】:
标签: lua garrys-mod