Hey, First off im using darkrp 2.5 anyways I uninstalled chat tags that from a thing I bought for ulx I didnt know it came with it then I removed it my server was working fine no errors but I was still trying to figure how to get OOC because it wasnt showing up then I started to get this:
[lua]
[ERROR] gamemodes/darkrp/gamemode/modules/chat/cl_chat.lua:32: attempt to call field 'AddNonParsedText' (a nil value)
1. func - gamemodes/darkrp/gamemode/modules/chat/cl_chat.lua:32
2. unknown - lua/includes/modules/net.lua:31
[/lua]
heres my cl_chat.lua
[lua]
/*---------------------------------------------------------------------------
Gamemode function
---------------------------------------------------------------------------*/
function GM:OnPlayerChat()
end
/*---------------------------------------------------------------------------
Add a message to chat
---------------------------------------------------------------------------*/
local function AddToChat(bits)
local col1 = Color(net.ReadUInt(8), net.ReadUInt(8), net.ReadUInt(8))
local prefixText = net.ReadString()
local ply = net.ReadEntity()
ply = IsValid(ply) and ply or LocalPlayer()
if prefixText == "" or not prefixText then
prefixText = ply:Nick()
prefixText = prefixText ~= "" and prefixText or ply:SteamName()
end
local col2 = Color(net.ReadUInt(8), net.ReadUInt(8), net.ReadUInt(8))
local text = net.ReadString()
local shouldShow
if text and text ~= "" then
if IsValid(ply) then
shouldShow = hook.Call("OnPlayerChat", GAMEMODE, ply, text, false, not ply:Alive(), prefixText, col1, col2)
end
if shouldShow ~= true then
chat.AddNonParsedText(col1, prefixText, col2, ": "..text)
end
else
shouldShow = hook.Call("ChatText", GAMEMODE, "0", prefixText, prefixText, "none")
if shouldShow ~= true then
chat.AddNonParsedText(col1, prefixText)
end
end
chat.PlaySound()
end
net.Receive("DarkRP_Chat", AddToChat)
/*---------------------------------------------------------------------------
Credits
Please only ADD to the credits.
---------------------------------------------------------------------------*/
local creds =
[[
LightRP was created by Rick darkalonio. LightRP was sandbox with some added RP elements.
LightRP was released at the end of January 2007
DarkRP was created as a spoof of LightRP by Rickster, somewhere during the summer of 2007.
Note: There was a DarkRP in 2006, but that was an entirely different gamemode.
Rickster went to serve his country and went to Afghanistan. During that time, the following people updated DarkRP:
Picwizdan
Sibre
[GNC] Matt
PhilXYZ
Chromebolt A.K.A. Unib5 (STEAM_0:1:19045957)
In 2008, Unib5 was administrator on a DarkRP server called EuroRP, owned by Jiggu. FPtje frequently joined this server to prop kill en masse. While Jiggu loved watching the chaos unfold, Unib5 hated it and banned FPtje on sight. Since Jiggu kept unbanning FPtje, Unib5 felt powerless. In an attempt to stop FPtje, Unib5 put FPtje's favourite prop killing props (the locker and the sawblade) in the default blacklist of DarkRP in an update. This in turn enraged FPtje, as he swore to make an update in secret that would suddenly pop up and overthrow the established version. As a result, DarkRP 2.3.1 was released in December 2008. After a bit of a fight, FPtje became the official updater of DarkRP.
Current developer:
Falco A.K.A. FPtje Atheos (STEAM_0:0:8944068)
People who have contributed (ordered by commits, with at least two commits)
Bo98
Drakehawke (STEAM_0:0:22342869) (64 commits on old SVN)
FiG-Scorn
Noiwex
KoZ
Eusion (STEAM_0:0:20450406) (3 commits on old SVN)
Gangleider
MattWalton12
TypicalRookie
]]
local function credits(um)
chat.AddNonParsedText(Color(255,0,0,255), "[", Color(50,50,50,255), GAMEMODE.Name, Color(255,0,0,255), "] ", Color(255, 255, 255, 255), DarkRP.getPhrase("credits_see_console"))
MsgC(Color(255,0,0,255), DarkRP.getPhrase("credits_for", GAMEMODE.Name))
MsgC(Color(255,255,255,255), creds)
end
usermessage.Hook("DarkRP_Credits", credits)
[/lua]
there is also net.lua not sure if its needed but it says there is an error with it but here
[lua]
net.Receivers = {}
--
-- Set up a function to receive network messages
--
function net.Receive( name, func )
net.Receivers[ name:lower() ] = func
end
--
-- A message has been received from the network..
--
function net.Incoming( len, client )
local i = net.ReadHeader()
local strName = util.NetworkIDToString( i )
if ( !strName ) then return end
local func = net.Receivers[ strName:lower() ]
if ( !func ) then return end
--
-- len includes the 16 byte int which told us the message name
--
len = len - 16
func( len, client )
end
--
-- Read/Write an entity to the stream
--
function net.WriteEntity( ent )
if ( !IsValid( ent ) ) then
net.WriteUInt( 0, 32 )
else
net.WriteUInt( ent:EntIndex(), 32 )
end
end
function net.ReadEntity( ent )
local i = net.ReadUInt( 32 )
if ( !i ) then return end
return Entity( i )
end
--
-- Write a whole table to the stream
-- This is less optimal than writing each
-- item indivdually and in a specific order
-- because it adds type information before each var
--
function net.WriteTable( tab )
for k, v in pairs( tab ) do
net.WriteType( k )
net.WriteType( v )
end
-- End of table
net.WriteUInt( 0, 8 )
end
function net.ReadTable()
local tab = {}
while true do
local t = net.ReadUInt( 8 )
if ( t == 0 ) then return tab end
local k = net.ReadType( t )
local t = net.ReadUInt( 8 )
if ( t == 0 ) then return tab end
local v = net.ReadType( t )
tab[ k ] = v
end
end
net.WriteVars =
{
[TYPE_NIL] = function ( t, v ) net.WriteUInt( t, 8 ) end,
[TYPE_STRING] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteString( v ) end,
[TYPE_NUMBER] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteFloat( v ) end,
[TYPE_TABLE] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteTable( v ) end,
[TYPE_BOOL] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteBit( v ) end,
[TYPE_ENTITY] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteEntity( v ) end,
[TYPE_VECTOR] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteVector( v ) end,
[TYPE_ANGLE] = function ( t, v ) net.WriteUInt( t, 8 ) net.WriteAngle( v ) end,
}
function net.WriteType( v )
local typeid = TypeID( v )
local wv = net.WriteVars[ typeid ]
if ( wv ) then return wv( typeid, v ) end
Error( "Couldn't write type " .. typeid )
end
net.ReadVars =
{
[TYPE_NIL] = function () return end,
[TYPE_STRING] = function () return net.ReadString() end,
[TYPE_NUMBER] = function () return net.ReadFloat() end,
[TYPE_TABLE] = function () return net.ReadTable() end,
[TYPE_BOOL] = function () return net.ReadBit() == 1 end,
[TYPE_ENTITY] = function () return net.ReadEntity() end,
[TYPE_VECTOR] = function () return net.ReadVector() end,
[TYPE_ANGLE] = function () return net.ReadAngle() end,
}
function net.ReadType( typeid )
local rv = net.ReadVars[ typeid ]
if ( rv ) then return rv( v ) end
Error( "Couldn't read type " .. typeid )
end
[/lua]
Im not sure what is going on I cant type "// hi" in the chat nothing will pop up just gives me that error
please help!
[editline]2nd April 2014[/editline]
fixed just found someone who had the file and replaced theirs with mine
Sorry, you need to Log In to post a reply to this thread.