Rodina простенький скрипт не работает, помогите решить

sadlines

Новичок
Автор темы
4
0
Код пишет в чат /gotobiz 1 /setbiz 1 12 и так до 98. с 99 до 196 /gotobiz 99 /setbiz 99 13. С 197 до 294 /gotobiz 197 /setbiz 197 14:
function main()
    repeat wait(0) until isSampAvailable()
   
    sampRegisterChatCommand('bizvv', function ()
        for i = 1, 294 do
            sampSendChat("/gotobiz " .. i)
            wait(1000) 

         
            local bizType
            if i < 99 then
                bizType = 12
            elseif i < 197 then
                bizType = 13
            else
                bizType = 14
            end
           
           
            sampSendChat("/setbiz " .. i .. " " .. bizType)
            wait(1000)  
        end
    end)
end