Author Topic: SUI Scoreboard  (Read 5180 times)

0 Members and 1 Guest are viewing this topic.

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
SUI Scoreboard
« on: January 22, 2011, 10:06:29 AM »
And to reopen this topic, and annoy you guys by posting off-topic questions, I use SUI Scoreboard with Utime, (love it.) but sometimes we get this,

[@sui_scoreboard\player_row.lua:43] Tried to use a NULL entity!
[@sui_scoreboard\player_row.lua:43] Tried to use a NULL entity!
[@sui_scoreboard\player_row.lua:43] Tried to use a NULL entity!
[@sui_scoreboard\player_row.lua:43] Tried to use a NULL entity!
[@sui_scoreboard\player_row.lua:43] Tried to use a NULL entity!

Any clue what causes it?
« Last Edit: January 22, 2011, 11:00:40 AM by Megiddo »

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: SUI Scoreboard
« Reply #1 on: January 22, 2011, 08:10:54 PM »
You should have posted this in the thread under Releases, but that error happens when you have the scoreboard open and a player leaves.  I haven't really look much into it myself as it isn't a very big issue.  Unless the creator tries to fix it, I'll try myself later.

EDIT:  I think I see the problem.  I'll try it out tomorrow on my server and see if it really was the problem.
« Last Edit: January 22, 2011, 08:21:42 PM by Aaron113 »

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: SUI Scoreboard
« Reply #2 on: January 22, 2011, 09:08:23 PM »
There are actually a few minor issues with sui_scoreboard.. I'm wanting to take a stab at fixing it up and making it run better with UTeam and whatnot.. someday.. when I get some time :-\
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: SUI Scoreboard
« Reply #3 on: January 23, 2011, 02:22:59 PM »
You should have posted this in the thread under Releases, but that error happens when you have the scoreboard open and a player leaves.  I haven't really look much into it myself as it isn't a very big issue.  Unless the creator tries to fix it, I'll try myself later.

EDIT:  I think I see the problem.  I'll try it out tomorrow on my server and see if it really was the problem.

Megiditto moved the topic to this forum. And thanks.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: SUI Scoreboard
« Reply #4 on: January 23, 2011, 07:32:32 PM »
Ahhh

Anyway, I haven't had a chance to try my fix as I ended up being busy today.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: SUI Scoreboard
« Reply #5 on: January 24, 2011, 12:43:59 PM »
Hmm, I forgot I can merge topics...

Oh well.
Experiencing God's grace one day at a time.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: SUI Scoreboard
« Reply #6 on: January 25, 2011, 09:41:21 AM »
I have somewhat fixed it.  All you have to do is add some lines into one of the files.

In the file "sui_scoreboard_modified_v2/lua/sui_scoreboard/player_row.lua"
Add after line 42 "if not self.Player:IsValid() then return end"

Seems like it is kind of sloppy to me, but I'm sure Stickly Man will clean it up/improve it when he has time.

It was returning a NIL value.  So, I added this in to make sure the player is valid before setting colors and whatnot.  You'll see a gray box and some words reading "Label"for a short time after a player leaves and I'm not sure why atm, but it does get rid of the errors.
« Last Edit: February 06, 2011, 02:41:24 PM by Aaron113 »

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: SUI Scoreboard
« Reply #7 on: January 25, 2011, 09:06:28 PM »
Thank you Arron, that will improve one of the current issues I have on my community server, You sir, deserve a cookie.

Code: [Select]

if ( self.Player:Team() == TEAM_CONNECTING ) then
color = Color( 100, 100, 100, 155 )
elseif ( self.Player:IsValid() ) then
//if ( team.GetName(self.Player:Team() ) == Unassigned) then
if ( tostring(self.Player:Team()) == tostring("1001") ) then
color = Color( 100, 100, 100, 255 )
else
tcolor = team.GetColor(self.Player:Team())
color = Color(tcolor.r,tcolor.g,tcolor.b,225)

end
elseif ( self.Player:IsAdmin() ) then
color = Color( 255, 155, 0, 255 )
end

if ( self.Player == LocalPlayer() ) then

tcolor = team.GetColor(self.Player:Team())
color = Color(tcolor.r,tcolor.g,tcolor.b,255)

end

if ( self.Open || self.Size != self.TargetSize ) then

draw.RoundedBox( 4, 18, 16, self:GetWide()-36, self:GetTall() - 16, color )
draw.RoundedBox( 4, 20, 16, self:GetWide()-40, self:GetTall() - 16 - 2, Color( 225, 225, 225, 150 ) )

surface.SetTexture( texGradient )
surface.SetDrawColor( 255, 255, 255, 100 )
surface.DrawTexturedRect( 20, 16, self:GetWide()-40, self:GetTall() - 16 - 2 )

end

draw.RoundedBox( 4, 18, 0, self:GetWide()-36, 24, color )

surface.SetTexture( texGradient )
surface.SetDrawColor( 255, 255, 255, 150 )
surface.DrawTexturedRect( 0, 0, self:GetWide()-36, 24 )

surface.SetTexture( self.texRating )
surface.SetDrawColor( 255, 255, 255, 255 )
surface.DrawTexturedRect( 20, 4, 16, 16 )

return true

The above code is my line(s) 42 to 88. I'm not sure if you tested this, but my version of the scoreboard has a "//if ( team.GetName(self.Player:Team() ) == Unassigned) then" line, about 4 lines down from line 42(the first line in code tags) That line is basically stating, if player not valid, set team to "Unassigned" which un-commenting that may fix the error, and may remove the gray label, in which you speak of.
« Last Edit: January 25, 2011, 09:15:29 PM by hymsan »

Offline norm555

  • Newbie
  • *
  • Posts: 9
  • Karma: -1
Re: SUI Scoreboard
« Reply #8 on: February 23, 2011, 09:27:03 PM »
If you do want a working and on-buggy version of the SUI Scoreboard, i just downloaded it here: http://www.garrysmod.org/downloads/?a=view&id=66617

Offline hymsan

  • Newbie
  • *
  • Posts: 28
  • Karma: 2
Re: SUI Scoreboard
« Reply #9 on: February 27, 2011, 10:23:45 AM »
If you do want a working and on-buggy version of the SUI Scoreboard, i just downloaded it here: http://www.garrysmod.org/downloads/?a=view&id=66617

That was uploaded like 600 days ago, coming to the forums for a fix, which I did, has fixed the issue. Thanks.