OnPlayerChat hook help

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:

I tried deleting player_shd.lua, but it did not work.

Here’s the code:


function lol_meh(ply, str)
    LocalPlayer():chatPrint(str)
end

hook.Add("OnPlayerChat", "lol meh", lol_meh)

Lua is case sensitive; it should be ChatPrint, not chatPrint. That’s the only problem I see here.

Awesome, it worked. Thanks