https://files.facepunch.com/forum/upload/273339/43fd0ed4-4642-4256-99e4-b01344239266/Screenshot_2.png
https://files.facepunch.com/forum/upload/273339/3704b8fe-034c-40da-9352-53ef2556a1a1/Screenshot_3.png
What is the problem? I can not understand this. Help please
function PostmanCheckPos(ply)
local money = math.random(2000,8000)
RunConsoleCommand("postman")
if ply:GetPos():Distance(posit) < 130 then
ply:ChatPrint('Вы доставили посылку и получили '..money..'$')
ply:addMoney(money)
end
end
ply is not existant. read the error code.
wow, seriously? I kind of wrote that I do not find the problem, because in other scripts that other people wrote they pointed out 'ply' and there were not any mistakes.
You have ply specified as an argument but the error says it's a nil value. That means wherever you are calling PostmanCheckPos, you are calling it like:
PostmanCheckPos()
or
PostmanCheckPos(nil_variable)
instead of
PostmanCheckPos(valid_player)
Sorry, you need to Log In to post a reply to this thread.