My PERP errors?

My Errors:

  1. [ERROR] gamemodes/perp/gamemode/scoreboards/scoreboard.lua:125: attempt to index field ‘lblPolice’ (a nil value)
  1. unknown - gamemodes/perp/gamemode/scoreboards/scoreboard.lua:125
  1. [ERROR] gamemodes/perp/gamemode/scoreboards/player_row.lua:67: attempt to call method ‘IsOwner’ (a nil value)
  1. unknown - gamemodes/perp/gamemode/scoreboards/player_row.lua:67

The code for these lines


self.lblPolice:SetText("Officers: " .. team.NumPlayers(TEAM_POLICE) .. " / " .. GAMEMODE.MaximumCops);
	self.lblFiremen:SetText("Firemen: " .. team.NumPlayers(TEAM_FIREMAN) .. " / " .. GAMEMODE.MaximumFireMen);
	self.lblMedics:SetText("Medics: " .. team.NumPlayers(TEAM_MEDIC) .. " / " .. GAMEMODE.MaximumParamedic);
	self.lblSWAT:SetText("SWAT: " .. team.NumPlayers(TEAM_SWAT) .. " / " .. GAMEMODE.MaximumSWAT);
	self.lblDispatcher:SetText("Dispatchers: " .. team.NumPlayers(TEAM_DISPATCHER) .. " / " .. GAMEMODE.MaximumDispatchers);
	self.lblSecretService:SetText("Secret Service: " .. team.NumPlayers(TEAM_SECRET_SERVICE) .. " / " .. GAMEMODE.MaximumSecretService);
	self.lblRoadCrew:SetText("Road Crew: " .. team.NumPlayers(TEAM_ROADCREW) .. " / " .. GAMEMODE.MaximumRoadCrew);
	self.lblBusDriver:SetText("Public Transportation: " .. team.NumPlayers(TEAM_BUSDRIVER) .. " / " .. GAMEMODE.MaximumBusDrivers);


if ( self.Player:IsOwner()  && (self.Player:GetUMsgInt("Disguise", 0) == 0) ) then
		color = Color( 0, 0, 0, 255);
		self.lblName:SetFGColor(Color(255, 255, 255,  55 + 200 * math.abs(math.sin(CurTime() * 2))));


If anyone can help I will be very grateful:D

Hey, here’s an idea.

Stop using perp.

I don’t think anyone is going to help you, and if you can’t fix the errors your self then you might want to think about using something else.

The PERP Gamemode is very much outdated unless you have good developers that can work well with the gamemode. By the sounds of it, You are not very good at the LUA Language and will struggle to actually get the gamemode functional without this knowledge. I would suggest you try and use a different gamemode which requires less LUA Knowledge.

  1. You are probably missing this (or maybe more) lines in the PANEL:Init()

self.lblPolice = vgui.Create( "DLabel", self )

Or there is an error when the panel is being created

  1. If you are using one of the bad perp leaks which come with a broken version of assmod then the IsOwner() function probably isn’t defined because the lua file it is in is not working with gmod 13.