• Gamemode Lua Error
    7 replies, posted
I am currently having issues getting my server up. One issue that i'm having is with the gamemode. I am getting this in the error files. Don't really know how to fix it. I'd appreciate any help, thanks. [ERROR] gamemodes/policerp/gamemode/modules/base/sv_gamemode_functions.lua:218: attempt to call field 'EntityRemoved' (a nil value) 1. unknown - gamemodes/policerp/gamemode/modules/base/sv_gamemode_functions.lua:218
Can you post your code?
Its something to do with this function 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
Did you delete or modify Sandbox or the base gamemode on your server?
I don't think I did. We replaced the files with files from our old server, but they were never edited or changed in any way as far as I know.
You may want to update your DarkRP, Sandbox, and Base gamemode then. The error implies "base" is missing its EntityRemoved function, or Sandbox isn't inheriting it.
How would I go about updating them? Would I just replace them with previous files that were possibly unedited?
Delete the folders (back them up somewhere else if you have custom changes you want to save) and pull the latest versions from SteamCMD/DarkRP.
Sorry, you need to Log In to post a reply to this thread.