This is the ERROR i get when pressing TAB:
[ERROR] addons/darkrp_scoreboard/lua/autorun/darkrp_scoreboard.lua:44: attempt to index upvalue 'pScoreBoard' (a nil value)
1. unknown - addons/darkrp_scoreboard/lua/autorun/darkrp_scoreboard.lua:44
This is the Download for the addon:
[url]https://garrysmods.org/download/6046/replacement-darkrp-scoreboard[/url]
This is the Text in the darkrp_scorebaord.lua file:
if SERVER then
AddCSLuaFile( "autorun/darkrp_scoreboard.lua" )
AddCSLuaFile( "scoreboard/admin_buttons.lua" )
AddCSLuaFile( "scoreboard/player_frame.lua" )
AddCSLuaFile( "scoreboard/player_infocard.lua" )
AddCSLuaFile( "scoreboard/player_row.lua" )
AddCSLuaFile( "scoreboard/scoreboard.lua" )
AddCSLuaFile( "scoreboard/vote_button.lua" )
return
end
include("scoreboard/scoreboard.lua")
local pScoreBoard = nil
/*---------------------------------------------------------
Name: gamemode:CreateScoreboard()
Desc: Creates/Recreates the scoreboard
---------------------------------------------------------*/
local function CreateScoreboard()
if pScoreBoard then
pScoreBoard:Remove()
pScoreBoard = nil
end
pScoreBoard = vgui.Create("RPScoreBoard")
end
/*---------------------------------------------------------
Name: gamemode:ScoreboardShow()
Desc: Sets the scoreboard to visible
---------------------------------------------------------*/
local function ScoreboardShow()
GAMEMODE.ShowScoreboard = true
gui.EnableScreenClicker(true)
if not pScoreBoard then
CreateScoreboard()
end
pScoreBoard:SetVisible(true)
pScoreBoard:UpdateScoreboard(true)
return true
end
/*---------------------------------------------------------
Name: gamemode:ScoreboardHide()
Desc: Hides the scoreboard
---------------------------------------------------------*/
hook.Add( "ScoreboardHide", "DarkRP_Override_H", function()
GAMEMODE.ShowScoreboard = false
gui.EnableScreenClicker(false)
if pScoreBoard then
pScoreBoard:SetVisible(false)
end
end )
hook.Add( "InitPostEntity", "HackyScoreBoardFix", function()
GAMEMODE.ScoreboardShow = ScoreboardShow
end )
[B]Can you fix this please? Thanks vin![/B]
RPScoreboard is not a valid vgui element. Maybe that was something from old DarkRP? You'll have to check the current documentation to see if DarkRP 2.6 has a replacement.
Sorry, you need to Log In to post a reply to this thread.