• Sandbox LUA error
    4 replies, posted
Hi, I'm getting this console error on my Sandbox server, and I have no clue at all, what might be causing it: [LUA][ERROR] lua/matproxy/player_color.lua:43: Tried to use a NULL entity! 1. GetPlayerColor - [C]:-1 2. bind - lua/matproxy/player_color.lua:43 3. unknown - lua/includes/modules/matproxy.lua:56 [/LUA] If you got any idea what might be causing this, that'd be great, as it's spamming our console. Edited: Oh yeah, almost forgot. Here is the file player_color.lua, however I have never touched it, so I dunno why it's causing errors: [LUA] -- Proxy Example: -- -- Proxies -- { -- PlayerColor -- { -- resultVar $color2 -- } -- } matproxy.Add( { name = "PlayerColor", init = function( self, mat, values ) -- Store the name of the variable we want to set self.ResultTo = values.resultvar end, bind = function( self, mat, ent ) if ( !IsValid( ent ) ) then return end -- -- If entity is a ragdoll try to convert it into the player -- if ( ent:IsRagdoll() ) then ent = ent:GetRagdollOwner() if ( !IsValid( ent ) ) then return end end -- -- If the target ent has a function called GetPlayerColor then use that -- The function SHOULD return a Vector with the chosen player's colour. -- -- In sandbox this function is created as a network function, -- in player_sandbox.lua in SetupDataTables -- if ( ent.GetPlayerColor ) then local col = ent:GetPlayerColor() if ( isvector( col ) ) then mat:SetVector( self.ResultTo, col ) end else mat:SetVector( self.ResultTo, Vector( 62.0/255.0, 88.0/255.0, 106.0/255.0 ) ) end end })[/LUA]
What gamemode? When exactly is the error happening?
[QUOTE=Robotboy655;43688904]What gamemode? When exactly is the error happening?[/QUOTE] Sandbox, probably occoured first time today, some users reported it today on my server atleast. I've installed some addons to the server recently, I'll list them underneath, so you can take a look if it looks like it might be the cause. [CODE]Unbreakable tool: http://steamcommunity.com/sharedfiles/filedetails/?id=111158387 Buoyancy Tool: http://steamcommunity.com/sharedfiles/filedetails/?id=104818321 Offset Trails: http://steamcommunity.com/sharedfiles/filedetails/?id=104527283 Smart Painter: http://steamcommunity.com/sharedfiles/filedetails/?id=126566296 AntiSpazzout: http://steamcommunity.com/sharedfiles/filedetails/?id=206320034 Collision Resizer: http://steamcommunity.com/sharedfiles/filedetails/?id=217376234[/CODE] I'm curious if Smart Painter might be the cause...
I mean at what point exactly it happens? When a player dies or spawn or when?
I don't know. But I think, that it might have something to do with when a player dies. By the way, players can give each other materials and colors on their playermodel.
Sorry, you need to Log In to post a reply to this thread.