не могу понять где энда не хватает

coldplugg.

Участник
Автор темы
180
22
Версия MoonLoader
Другое
Lua:
if text:find("(.*)%[(%d+)%]: бот реги (%d+)") and not get_ip_information then
            anickname, aid, checkid = text:match("(.*)%[(%d+)%]: бот реги (%d+)")
            if isPlayerConnected(tonumber(checkid)) then
              sendInput('/a Окей, собираю информацию...')
              get_ip_information = true
              type_ip_information = 1
              sendInput('/getip '..checkid)
            for t = 1, #rdata do
                if rdata[t].status == "success" then
                  local distance = distance_cord(rdata[1].lat, rdata[1].lon, rdata[t].lat, rdata[t].lon)
                  if t == 1 then
                  if type_ip_information == 1 then
                    sendInput('/a '..string.format([[[REG] Страна - %s | Город - %s | Провайдер - %s ]], rdata[t].country, rdata[t].city, rdata[t].isp))
                end
            end
ракбот жалуется что не хватает энда на первый иф, поправьте кто может
 
Решение
Lua:
if text:find("(.*)%[(%d+)%]: бот реги (%d+)") and not get_ip_information then
    anickname, aid, checkid = text:match("(.*)%[(%d+)%]: бот реги (%d+)")
    if isPlayerConnected(tonumber(checkid)) then
        sendInput('/a Окей, собираю информацию...')
        get_ip_information = true
        type_ip_information = 1
        sendInput('/getip '..checkid)
        for t = 1, #rdata do
            if rdata[t].status == "success" then
                local distance = distance_cord(rdata[1].lat, rdata[1].lon, rdata[t].lat, rdata[t].lon)
                if t == 1 then
                    if type_ip_information == 1 then
                        sendInput('/a '..string.format([[[REG] Страна - %s | Город - %s | Провайдер - %s ]]...

Vespan

loneliness
Проверенный
2,109
1,632
Lua:
if text:find("(.*)%[(%d+)%]: бот реги (%d+)") and not get_ip_information then
            anickname, aid, checkid = text:match("(.*)%[(%d+)%]: бот реги (%d+)")
            if isPlayerConnected(tonumber(checkid)) then
              sendInput('/a Окей, собираю информацию...')
              get_ip_information = true
              type_ip_information = 1
              sendInput('/getip '..checkid)
            for t = 1, #rdata do
                if rdata[t].status == "success" then
                  local distance = distance_cord(rdata[1].lat, rdata[1].lon, rdata[t].lat, rdata[t].lon)
                      if t == 1 then
                          if type_ip_information == 1 then
                            sendInput('/a '..string.format([[[REG] Страна - %s | Город - %s | Провайдер - %s ]], rdata[t].country, rdata[t].city, rdata[t].isp))
                        end
                    end
                end
            end
 
  • Bug
Реакции: Стрелок и ARMOR

coldplugg.

Участник
Автор темы
180
22
Lua:
if text:find("(.*)%[(%d+)%]: бот реги (%d+)") and not get_ip_information then
            anickname, aid, checkid = text:match("(.*)%[(%d+)%]: бот реги (%d+)")
            if isPlayerConnected(tonumber(checkid)) then
              sendInput('/a Окей, собираю информацию...')
              get_ip_information = true
              type_ip_information = 1
              sendInput('/getip '..checkid)
            for t = 1, #rdata do
                if rdata[t].status == "success" then
                  local distance = distance_cord(rdata[1].lat, rdata[1].lon, rdata[t].lat, rdata[t].lon)
                      if t == 1 then
                          if type_ip_information == 1 then
                            sendInput('/a '..string.format([[[REG] Страна - %s | Город - %s | Провайдер - %s ]], rdata[t].country, rdata[t].city, rdata[t].isp))
                        end
                    end
                end
            end
1667656479217.png
 

qdIbp

Автор темы
Проверенный
1,389
1,146
Lua:
if text:find("(.*)%[(%d+)%]: бот реги (%d+)") and not get_ip_information then
    anickname, aid, checkid = text:match("(.*)%[(%d+)%]: бот реги (%d+)")
    if isPlayerConnected(tonumber(checkid)) then
        sendInput('/a Окей, собираю информацию...')
        get_ip_information = true
        type_ip_information = 1
        sendInput('/getip '..checkid)
        for t = 1, #rdata do
            if rdata[t].status == "success" then
                local distance = distance_cord(rdata[1].lat, rdata[1].lon, rdata[t].lat, rdata[t].lon)
                if t == 1 then
                    if type_ip_information == 1 then
                        sendInput('/a '..string.format([[[REG] Страна - %s | Город - %s | Провайдер - %s ]], rdata[t].country, rdata[t].city, rdata[t].isp))
                    end
                end
            end
        end
    end
end
 
  • Нравится
Реакции: zTechnology

zTechnology

Известный
1,101
485
Lua:
if text:find("(.*)%[(%d+)%]: бот реги (%d+)") and not get_ip_information then
            anickname, aid, checkid = text:match("(.*)%[(%d+)%]: бот реги (%d+)")
            if isPlayerConnected(tonumber(checkid)) then
              sendInput('/a Окей, собираю информацию...')
              get_ip_information = true
              type_ip_information = 1
              sendInput('/getip '..checkid)
            for t = 1, #rdata do
                if rdata[t].status == "success" then
                  local distance = distance_cord(rdata[1].lat, rdata[1].lon, rdata[t].lat, rdata[t].lon)
                  if t == 1 then
                  if type_ip_information == 1 then
                    sendInput('/a '..string.format([[[REG] Страна - %s | Город - %s | Провайдер - %s ]], rdata[t].country, rdata[t].city, rdata[t].isp))
                end
            end
ракбот жалуется что не хватает энда на первый иф, поправьте кто может
Lua:
if text:find("(.*)%[(%d+)%]: бот реги (%d+)") and not get_ip_information then
    anickname, aid, checkid = text:match("(.*)%[(%d+)%]: бот реги (%d+)")
    if isPlayerConnected(tonumber(checkid)) then
        sendInput("/a Окей, собираю информацию...")
        get_ip_information = true
        type_ip_information = 1
        sendInput("/getip " .. checkid)
        for t = 1, #rdata do
            if rdata[t].status == "success" then
                local distance = distance_cord(rdata[1].lat, rdata[1].lon, rdata[t].lat, rdata[t].lon)
                if t == 1 then
                    if type_ip_information == 1 then
                        sendInput(
                            "/a " ..
                                string.format(
                                    [[[REG] Страна - %s | Город - %s | Провайдер - %s ]],
                                    rdata[t].country,
                                    rdata[t].city,
                                    rdata[t].isp
                                )
                        )
                    end
                end
            end
        end
    end
end
 
  • Нравится
Реакции: qdIbp

coldplugg.

Участник
Автор темы
180
22
Lua:
if text:find("(.*)%[(%d+)%]: бот реги (%d+)") and not get_ip_information then
    anickname, aid, checkid = text:match("(.*)%[(%d+)%]: бот реги (%d+)")
    if isPlayerConnected(tonumber(checkid)) then
        sendInput('/a Окей, собираю информацию...')
        get_ip_information = true
        type_ip_information = 1
        sendInput('/getip '..checkid)
        for t = 1, #rdata do
            if rdata[t].status == "success" then
                local distance = distance_cord(rdata[1].lat, rdata[1].lon, rdata[t].lat, rdata[t].lon)
                if t == 1 then
                    if type_ip_information == 1 then
                        sendInput('/a '..string.format([[[REG] Страна - %s | Город - %s | Провайдер - %s ]], rdata[t].country, rdata[t].city, rdata[t].isp))
                    end
                end
            end
        end
    end
end
❤️
 
  • Вау
Реакции: qdIbp