Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: hymsan 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?
-
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.
-
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 :-\
-
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.
-
Ahhh
Anyway, I haven't had a chance to try my fix as I ended up being busy today.
-
Hmm, I forgot I can merge topics...
Oh well.
-
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.
-
Thank you Arron, that will improve one of the current issues I have on my community server, You sir, deserve a cookie.
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.
-
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 (http://www.garrysmod.org/downloads/?a=view&id=66617)
-
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 (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.