PERP Shop Error

For some reason the models wont show in the clothes store or when u spawn and i was wondering how i could fix it ill give u all the places where it deals with players.
[lua]function PlayerMetaTable:SaveModel ( NewModel )
if !file.Exists(’…/’ … NewModel) then return false; end

util.PrecacheModel(NewModel);
self:SetModel(NewModel);

tmysql.query(“UPDATE rp_users SET model=’” … NewModel … “’ WHERE steamid=’” … self:SteamID() … “’”);

self:GetTable().RoleplayData.ShortModel = string.GetFileFromFilename(NewModel);

umsg.Start(‘perp_update_smodel’, self);
umsg.String(self:GetTable().RoleplayData.ShortModel);
umsg.End();
end

function GM.SelectModel ( Player, Command, Args )
local Model = ‘models/players/humans/group01/’ … tostring(Args[1]);

if !file.Exists(’…/’ … Model) then return false; end

Player:SaveModel(Model);
end
concommand.Add(‘perp_sm’, GM.SelectModel);

function GM:PlayerSetModel ( Player )
if !IsValid(Player) then return false; end
if !Player:GetTable().RoleplayData or !Player:GetTable().RoleplayData.Model then
timer.Simple(1, self.PlayerSetModel, self, Player);
util.PrecacheModel(‘models/players/humans/group01/clo1_01.mdl’);
Player:SetModel(‘models/players/humans/group01/clo1_01.mdl’);
return false;
end

if GAMEMODE.PlayerSpawn_Event then GAMEMODE.PlayerSpawn_Event(Player) end
if GAMEMODE.PlayerSetModel_Event and GAMEMODE.PlayerSetModel_Event(Player) then return false; end

local CopPrefix = ‘0’ … math.random(1, 9) … ‘.mdl’;

if !Player:GetTable().RoleplayData then
util.PrecacheModel(‘models/players/humans/group01/clo1_01.mdl’);
Player:SetModel(‘models/players/humans/group01/clo1_01.mdl’);
return false;
end

if Player:GetTable().RoleplayData.Model != ‘’ and Player:GetSex() != SEX_FEMALE then CopPrefix = string.Explode(’_’, Player:GetTable().RoleplayData.Model)[2]; end

local ParamedicPrefix = string.Explode(’_’, Player:GetTable().RoleplayData.Model)[2];

if os.date(’%m%d’) == ‘0420’ and !GAMEMODE.IsSeriousRP() then
Player:SetModel(‘models/420day.mdl’);
Player:PrintMessage(HUD_PRINTTALK, “Happy 4/20! ( It’s all in good fun, please don’t get mad! )”);

return false;
end // YA 4/20 MAN!!!

if Player:Team() == TEAM_MAYOR then
Player:SetModel(‘models/player/breen.mdl’);
elseif Player:Team() == TEAM_POLICE then
if file.Exists(‘models/humans/NYPD/male_’ … CopPrefix) then
util.PrecacheModel(‘models/humans/NYPD/male_’ … CopPrefix);
Player:SetModel(‘models/humans/NYPD/male_’ … CopPrefix);
else
util.PrecacheModel(‘models/humans/NYPD/male_01.mdl’);
Player:SetModel(‘models/humans/NYPD/male_01.mdl’);
end
elseif Player:Team() == TEAM_SWAT then
util.PrecacheModel(‘models/player/swa2.mdl’);
Player:SetModel(‘models/player/swa2.mdl’);
elseif Player:Team() == TEAM_FIREMAN then
util.PrecacheModel(‘models/players/humans/group01/fire_0’ … math.random(1, 3) … ‘.mdl’);
Player:SetModel(‘models/players/humans/group01/fire_0’ … math.random(1, 3) … ‘.mdl’);
elseif Player:Team() == TEAM_PARAMEDIC then
if Player:GetSex() == SEX_FEMALE then
if file.Exists(‘models/players/humans/group01/clo6fe_’ … ParamedicPrefix) then
util.PrecacheModel(‘models/players/humans/group01/clo6fe_’ … ParamedicPrefix);
Player:SetModel(‘models/players/humans/group01/clo6fe_’ … ParamedicPrefix);
else
util.PrecacheModel(‘models/players/humans/group01/clo6fe_01.mdl’);
Player:SetModel(‘models/players/humans/group01/clo6fe_01.mdl’);
end
else
if file.Exists(‘models/players/humans/group01/clo7_’ … ParamedicPrefix) then
util.PrecacheModel(‘models/players/humans/group01/clo7_’ … ParamedicPrefix);
Player:SetModel(‘models/players/humans/group01/clo7_’ … ParamedicPrefix);
else
util.PrecacheModel(‘models/players/humans/group01/clo7_01.mdl’);
Player:SetModel(‘models/players/humans/group01/clo7_01.mdl’);
end
end
else
if Player:GetTable().RoleplayData.Model != ‘’ and !string.find(Player:GetTable().RoleplayData.Model, ‘fire_’) and !string.find(Player:GetTable().RoleplayData.Model, ‘clo6fe_’) and !string.find(Player:GetTable().RoleplayData.Model, ‘clo7_’) then
util.PrecacheModel(Player:GetTable().RoleplayData.Model);
Player:SetModel(Player:GetTable().RoleplayData.Model);
else
util.PrecacheModel(‘models/players/humans/group01/clo1_01.mdl’);
Player:SetModel(‘models/players/humans/group01/clo1_01.mdl’);
umsg.Start(‘perp_select_model’, Player); umsg.End();
end
end
end

function PlayerMetaTable:GetShortModel ( )
return self:GetTable().RoleplayData.ShortModel or ‘/clo1_01.mdl’;
end

function PlayerMetaTable:GetSoundPrefix ( )
local Sex = self:GetSex();

if Sex == SEX_FEMALE then
return “female”;
end

return “male”;
end

// Model stuff
SEX_FEMALE = 1;
SEX_MALE = 2;
function PlayerMetaTable:GetSex ( )
if SERVER or self == LocalPlayer() then
local OurModel = self:GetShortModel();

if string.find(OurModel, “fe”) then
return SEX_FEMALE;
end
else
local OurModel = self:GetModel();

if string.find(string.lower(OurModel), “female”) then
return SEX_FEMALE
end
end

return SEX_MALE;
end[/lua]

This is what happens when i click on the clothes store vendor then click buy clothes

[@lua\vgui\dmodelpanel.lua:69] bad argument #1 to ‘ClientsideModel’ (string expected, got nil)

Use [noparse][lua]<your stuff>[/lua][/noparse]

hold on what? im trying to make it so the shops actually show the models.

because i dont know what im suppposed to do to fix this hints not awnsering my question.

Could you paste the WHOLE file?
Because I dont know what line 69 is because that is just the function.