Hi there,
here's an error that is a pain in the ass. I had a version that worked, but I lost it. When I tried recreating it doing nothing different, it gives me this error:
[quote]ERROR: GAMEMODE:'OnPlayerChat' Failed: base\gamemode\player_shd.lua:173: attempt to call field 'AddText' (a nil value)[/quote]
I tried deleting player_shd.lua, but it did not work.
Here's the code:
[code]function lol_meh(ply, str)
LocalPlayer():chatPrint(str)
end
hook.Add("OnPlayerChat", "lol meh", lol_meh)[/code]
Lua is case sensitive; it should be ChatPrint, not chatPrint. That's the only problem I see here.
Awesome, it worked. Thanks
Sorry, you need to Log In to post a reply to this thread.