Help with DarkRP lua!

I keep getting the error: ERROR: GAMEMODE:‘PlayerSay’ Failed: [gamemodes\boxing\gamemode\chat.lua:11] attempt to call method ‘SteamName’ (a nil value)

I need help fixing this!

function _R.Player:SteamName()
return self:Nick()
end

Put this in shared.lua

thanks but now it says : ERROR: GAMEMODE:‘PlayerSay’ Failed: [gamemodes\boxing\gamemode\chat.lua:11] attempt to call field ‘Log’ (a nil value)

this is stupid it was working before :frowning:

did you recently uninstall any addons/luascripts?
that may be the problem.

not really i was trying to make my own gamemode and i have the money and everything but it wont let me do the commands to give people money or drop it even though i have the models

give me line 11-15

heres the whole code:

Use [lua] tags please…

So it appears, like you said, to create a new gamemode. If you’re trying to create a non-rp gamemode, you are doing it wrong.

Getting past that, I compared your version with the latest darkrp, and it appears everything in that file is the same except the function names have RP_ taken off (intentionally I’m guessing) aannndd the thing that’s breaking it:

Your line 69.

Since the other functions in there (besides the GM:PlayerSay function) are local, they are not getting called anywhere else. The GM:PlayerSay function is using the new function names, so you’re good there.

(Here’s where the unless is)
So unless you went in that other file and replaced the hook identifier with (probably):
“ChatCommands”, then you will have to change this mistake to “ChatCommands”

Pretty much to sum it up now; I searched through all main darkrp files except in the following directories: FPP,FAdmin,modules
None of the files outside of those directories seems to call the original hook id name.

Change line 69 to ChatCommands
If that doesn’t work change it back to DarkRP_ChatCommands
If that doesn’t work either the latest svn is screwed or you did something else.