function checkMoney2(thePlayer, command, who)
if (who == nil ) or who == false then
outputChatBox ("ERROR: You must insert a valid player name.", thePlayer, 255, 0, 0, false)
else
local who2 = getPlayerFromName(who)
local Name = getPlayerName(who2)
outputChatBox("*"..who.." Has $"..getPlayerMoney(who2).."",getRootElement(),255,255,0)
end
end
addCommandHandler("cash", checkMoney2)
you forgot to do getPlayerFromName