• ent:GetPlayerColor() Tried to use NULL entity
    4 replies, posted
Multiple players keep getting this error on my server. The error does not link back to any addon. Is there a way I can find out what is causing it? [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
It's not an addon, probably just a gmod bug
Post lines 35-50 of player_color.lua
This is what the file looks like on my server but the errors are clientside. I'm assuming the file is the same though. I did post this issue to the github gmod-issues and was told it's an issue with my server. [LUA] -- -- 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 [/LUA]
Anybody got any ideas on this?
Sorry, you need to Log In to post a reply to this thread.