Problem with setting player model.

Hello.

I’m having a problem with setting player model.
player.lua
[lua]local meta = FindMetaTable( “Player” )

function meta:PlayerSetModel( model )

if model == "" then

	local cl_playermodel = self:GetInfo( "cl_playermodel" )
	local modelname = player_manager.TranslatePlayerModel( cl_playermodel )

else

	local modelname = player_manager.TranslatePlayerModel( model )

end

util.PrecacheModel( modelname )
self:SetModel( modelname )

end[/lua]
It’s called from init.lua
[lua]ply:PlayerSetModel( “” )[/lua]
The error i get.

Found out on my own.
[lua]local meta = FindMetaTable( “Player” )

function meta:PlayerSetModel( model )

local cl_playermodel = self:GetInfo( "cl_playermodel" )
local modelname = ""
if model == "" then

	modelname = player_manager.TranslatePlayerModel( cl_playermodel )

else

	modelname = player_manager.TranslatePlayerModel( model )

end

util.PrecacheModel( modelname )
self:SetModel( modelname )

end[/lua]