Вопросы по Lua скриптингу

Общая тема для вопросов по разработке скриптов на языке программирования Lua, в частности под MoonLoader.
  • Задавая вопрос, убедитесь, что его нет в списке частых вопросов и что на него ещё не отвечали (воспользуйтесь поиском).
  • Поищите ответ в теме посвященной разработке Lua скриптов в MoonLoader
  • Отвечая, убедитесь, что ваш ответ корректен.
  • Старайтесь как можно точнее выразить мысль, а если проблема связана с кодом, то обязательно прикрепите его к сообщению, используя блок [code=lua]здесь мог бы быть ваш код[/code].
  • Если вопрос связан с MoonLoader-ом первым делом желательно поискать решение на wiki.

Частые вопросы

Как научиться писать скрипты? С чего начать?
Информация - Гайд - Всё о Lua скриптинге для MoonLoader(https://blast.hk/threads/22707/)
Как вывести текст на русском? Вместо русского текста у меня какие-то каракули.
Изменить кодировку файла скрипта на Windows-1251. В Atom: комбинация клавиш Ctrl+Shift+U, в Notepad++: меню Кодировки -> Кодировки -> Кириллица -> Windows-1251.
Как получить транспорт, в котором сидит игрок?
Lua:
local veh = storeCarCharIsInNoSave(PLAYER_PED)
Как получить свой id или id другого игрока?
Lua:
local _, id = sampGetPlayerIdByCharHandle(PLAYER_PED) -- получить свой ид
local _, id = sampGetPlayerIdByCharHandle(ped) -- получить ид другого игрока. ped - это хендл персонажа
Как проверить, что строка содержит какой-то текст?
Lua:
if string.find(str, 'текст', 1, true) then
-- строка str содержит "текст"
end
Как эмулировать нажатие игровой клавиши?
Lua:
local game_keys = require 'game.keys' -- где-нибудь в начале скрипта вне функции main

setGameKeyState(game_keys.player.FIREWEAPON, -1) -- будет сэмулировано нажатие клавиши атаки
Все иды клавиш находятся в файле moonloader/lib/game/keys.lua.
Подробнее о функции setGameKeyState здесь: lua - setgamekeystate | BlastHack — DEV_WIKI(https://www.blast.hk/wiki/lua:setgamekeystate)
Как получить id другого игрока, в которого целюсь я?
Lua:
local valid, ped = getCharPlayerIsTargeting(PLAYER_HANDLE) -- получить хендл персонажа, в которого целится игрок
if valid and doesCharExist(ped) then -- если цель есть и персонаж существует
  local result, id = sampGetPlayerIdByCharHandle(ped) -- получить samp-ид игрока по хендлу персонажа
  if result then -- проверить, прошло ли получение ида успешно
    -- здесь любые действия с полученным идом игрока
  end
end
Как зарегистрировать команду чата SAMP?
Lua:
-- До бесконечного цикла/задержки
sampRegisterChatCommand("mycommand", function (param)
     -- param будет содержать весь текст введенный после команды, чтобы разделить его на аргументы используйте string.match()
    sampAddChatMessage("MyCMD", -1)
end)
Крашит игру при вызове sampSendChat. Как это исправить?
Это происходит из-за бага в SAMPFUNCS, когда производится попытка отправки пакета определенными функциями изнутри события исходящих RPC и пакетов. Исправления для этого бага нет, но есть способ не провоцировать его. Вызов sampSendChat изнутри обработчика исходящих RPC/пакетов нужно обернуть в скриптовый поток с нулевой задержкой:
Lua:
function onSendRpc(id)
  -- крашит:
  -- sampSendChat('Send RPC: ' .. id)

  -- норм:
  lua_thread.create(function()
    wait(0)
    sampSendChat('Send RPC: ' .. id)
  end)
end
 
Последнее редактирование:
D

deleted-user-204957

Гость
Подскажите где можно найти информацию о Имгуи? Просто в данной теме почти ничего не рассказано https://blast.hk/threads/19292/
Тут всё есть
 

Izvinisb

Известный
Проверенный
964
598
Подскажите, как записть все полученные ID-ы игроков в таблицу/массив.
Lua:
function sampev.onServerMessage(color, text)
    if state then
        if string.find(text, "Lvl", 1, true) then      
            if text:match("%[(%d+)%]") then
                getit = text:match("%[(%d+)%]")
                print(getit) -- id-ы игроков
            end
        end
    end
end
 

Mamory

Участник
34
1
Подскажите, как записть все полученные ID-ы игроков в таблицу/массив.
Lua:
function sampev.onServerMessage(color, text)
    if state then
        if string.find(text, "Lvl", 1, true) then   
            if text:match("%[(%d+)%]") then
                getit = text:match("%[(%d+)%]")
                print(getit) -- id-ы игроков
            end
        end
    end
end
Создаёшь таблицу
Lua:
local tableofid = {}
И добавляешь ид в эту таблицу
Lua:
table.insert(tableofid, переменная с ид )
 
  • Нравится
Реакции: Izvinisb

Anton Nixon

Активный
474
48
Как создать подобное? Подскажите/скиньте темы по данному вопросу
IMG_20200214_020452.jpg
 

Mamory

Участник
34
1
Popup в imgui, это типо новое окно, поверх текущего?
Как можно использовать popup есть какие то гайдики, примеры?
 

yeahbitch

Потрачен
28
5
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Помогите, пожалуйста xd
Код:
[10:02:36.737800] (system)    Loading script 'C:\Games\арз ловля\GTA DNO PC DAPO SHOW\moonloader\Prison Helper 2.0.lua'...
[10:02:36.737800] (debug)    New script: 0F29E8A4
[10:02:36.763800] (error)    Prison Helper 2.0.lua: ...ля\GTA DNO PC DAPO SHOW\moonloader\Prison Helper 2.0.lua:24: attempt to index global 'ini' (a nil value)
stack traceback:
    ...ля\GTA DNO PC DAPO SHOW\moonloader\Prison Helper 2.0.lua:24: in main chunk
Lua:
local vkeys = require 'vkeys'
local wm = require 'lib.windows.message'
local imgui = require 'imgui'
local encoding = require 'encoding'
local rkeys = require 'rkeys'
local sampev   = require 'lib.samp.events'
local inicfg      = require 'inicfg'
imgui.ToggleButton = require('imgui_addons').ToggleButton
imgui.HotKey = require('imgui_addons').HotKey
imgui.Spinner = require('imgui_addons').Spinner
imgui.BufferingBar = require('imgui_addons').BufferingBar
encoding.default = 'CP1251'
u8 = encoding.UTF8

local vkladki = {
    false,
        false,
        false,
        false,
        false,
        false,
}

vkladki[ini.settings.vkladka] = true

local directIni = "PrisonHelper\\settings.ini"

local ini = inicfg.load(def, directIni)

local def = {
    settings = {
        vkladka = 1,
    }}

local window = imgui.ImBool(false)
local ActiveMenu = {
    v = {vkeys.VK_F2}
}
local bindID = 0

function main()
   if not isSampLoaded() then
      return
   end
   while not isSampAvailable() do
      wait(0)
    end
    sampRegisterChatCommand("prhelp", function ()
        window.v = not window.v
    end)
    bindID = rkeys.registerHotKey(ActiveMenu.v, true, function ()
        window.v = not window.v
    end)
    while true do
        wait(0)
        imgui.Process = window.v
    end
end

function apply_custom_style()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    style.WindowRounding = 1.5
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    style.ChildWindowRounding = 1.5
    style.FrameRounding = 1.0
    style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
    style.ScrollbarSize = 13.0
    style.ScrollbarRounding = 0
    style.GrabMinSize = 8.0
    style.GrabRounding = 1.0
    -- style.Alpha =
    style.WindowPadding = imgui.ImVec2(4.0, 4.0)
    -- style.WindowMinSize =
    style.FramePadding = imgui.ImVec2(2.5, 3.5)
    -- style.ItemInnerSpacing =
    -- style.TouchExtraPadding =
    -- style.IndentSpacing =
    -- style.ColumnsMinSpacing = ?
    style.ButtonTextAlign = imgui.ImVec2(0.02, 0.4)
    -- style.DisplayWindowPadding =
    -- style.DisplaySafeAreaPadding =
    -- style.AntiAliasedLines =
    -- style.AntiAliasedShapes =
    -- style.CurveTessellationTol =
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
    colors[clr.WindowBg]               = imgui.ImColor(20, 20, 20, 255):GetVec4()
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = imgui.ImColor(40, 142, 110, 90):GetVec4()
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg]                = imgui.ImColor(40, 142, 110, 113):GetVec4()
    colors[clr.FrameBgHovered]         = imgui.ImColor(40, 142, 110, 164):GetVec4()
    colors[clr.FrameBgActive]          = imgui.ImColor(40, 142, 110, 255):GetVec4()
    colors[clr.TitleBg]                = imgui.ImColor(40, 142, 110, 236):GetVec4()
    colors[clr.TitleBgActive]          = imgui.ImColor(40, 142, 110, 236):GetVec4()
    colors[clr.TitleBgCollapsed]       = ImVec4(0.05, 0.05, 0.05, 0.79)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = imgui.ImColor(40, 142, 110, 236):GetVec4()
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CheckMark]              = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.28, 0.28, 0.28, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.35, 0.35, 0.35, 1.00)
    colors[clr.Button]                 = imgui.ImColor(35, 35, 35, 255):GetVec4()
    colors[clr.ButtonHovered]          = imgui.ImColor(35, 121, 93, 174):GetVec4()
    colors[clr.ButtonActive]           = imgui.ImColor(44, 154, 119, 255):GetVec4()
    colors[clr.Header]                 = imgui.ImColor(40, 142, 110, 255):GetVec4()
    colors[clr.HeaderHovered]          = ImVec4(0.34, 0.34, 0.35, 0.89)
    colors[clr.HeaderActive]           = ImVec4(0.12, 0.12, 0.12, 0.94)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ResizeGrip]             = imgui.ImColor(40, 142, 110, 255):GetVec4()
    colors[clr.ResizeGripHovered]      = imgui.ImColor(35, 121, 93, 174):GetVec4()
    colors[clr.ResizeGripActive]       = imgui.ImColor(44, 154, 119, 255):GetVec4()
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.10, 0.10, 0.10, 0.35)
end
apply_custom_style()

local imBool = imgui.ImBool(false)
local imBool2 = imgui.ImBool(false)
local imBool3 = imgui.ImBool(false)
local imBool4 = imgui.ImBool(false)

function imgui.OnDrawFrame()
    local iScreenWidth, iScreenHeight = getScreenResolution()
    local tLastKeys = {}
 
   imgui.SetNextWindowPos(imgui.ImVec2(iScreenWidth / 2, iScreenHeight / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
   imgui.SetNextWindowSize(imgui.ImVec2(400, 200), imgui.Cond.FirstUseEver)
 
   imgui.Begin("Prison Helper", window)
           imgui.BeginChild('left pane', imgui.ImVec2(150, 0), true)
               if imgui.Button(u8"Для мл. состава", imgui.ImVec2(133, 35)) then
                vkladki[1] = true
                ini.settings.vkladka = 1
                inicfg.save(def, directIni)
            end
            if imgui.Button(u8"Для ст. состава", imgui.ImVec2(133, 35)) then
                vkladki[2] = true
                ini.settings.vkladka = 2
                inicfg.save(def, directIni)
            end
            if imgui.Button(u8"Для ст. состава", imgui.ImVec2(133, 35)) then
                vkladki[3] = true
                ini.settings.vkladka = 3
                inicfg.save(def, directIni)
            end
            if imgui.Button(u8"РП задания", imgui.ImVec2(133, 35)) then
                vkladki[4] = true
                ini.settings.vkladka = 4
                inicfg.save(def, directIni)
            end
        imgui.EndChild()
        if vkladki[2] == true then
        imgui.ToggleButton("Тест", imBool2)
        imgui.Text(u8("Ага да"))
        end
   imgui.End()
end

function imgui.TextQuestion(text)
    imgui.TextDisabled('(?)')
    if imgui.IsItemHovered() then
        imgui.BeginTooltip()
        imgui.PushTextWrapPos(450)
        imgui.TextUnformatted(text)
        imgui.PopTextWrapPos()
        imgui.EndTooltip()
    end
end
 

Quasper

Известный
834
354
Помогите, пожалуйста xd
Код:
[10:02:36.737800] (system)    Loading script 'C:\Games\арз ловля\GTA DNO PC DAPO SHOW\moonloader\Prison Helper 2.0.lua'...
[10:02:36.737800] (debug)    New script: 0F29E8A4
[10:02:36.763800] (error)    Prison Helper 2.0.lua: ...ля\GTA DNO PC DAPO SHOW\moonloader\Prison Helper 2.0.lua:24: attempt to index global 'ini' (a nil value)
stack traceback:
    ...ля\GTA DNO PC DAPO SHOW\moonloader\Prison Helper 2.0.lua:24: in main chunk
Lua:
local vkeys = require 'vkeys'
local wm = require 'lib.windows.message'
local imgui = require 'imgui'
local encoding = require 'encoding'
local rkeys = require 'rkeys'
local sampev   = require 'lib.samp.events'
local inicfg      = require 'inicfg'
imgui.ToggleButton = require('imgui_addons').ToggleButton
imgui.HotKey = require('imgui_addons').HotKey
imgui.Spinner = require('imgui_addons').Spinner
imgui.BufferingBar = require('imgui_addons').BufferingBar
encoding.default = 'CP1251'
u8 = encoding.UTF8

local vkladki = {
    false,
        false,
        false,
        false,
        false,
        false,
}

vkladki[ini.settings.vkladka] = true

local directIni = "PrisonHelper\\settings.ini"

local ini = inicfg.load(def, directIni)

local def = {
    settings = {
        vkladka = 1,
    }}

local window = imgui.ImBool(false)
local ActiveMenu = {
    v = {vkeys.VK_F2}
}
local bindID = 0

function main()
   if not isSampLoaded() then
      return
   end
   while not isSampAvailable() do
      wait(0)
    end
    sampRegisterChatCommand("prhelp", function ()
        window.v = not window.v
    end)
    bindID = rkeys.registerHotKey(ActiveMenu.v, true, function ()
        window.v = not window.v
    end)
    while true do
        wait(0)
        imgui.Process = window.v
    end
end

function apply_custom_style()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    style.WindowRounding = 1.5
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    style.ChildWindowRounding = 1.5
    style.FrameRounding = 1.0
    style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
    style.ScrollbarSize = 13.0
    style.ScrollbarRounding = 0
    style.GrabMinSize = 8.0
    style.GrabRounding = 1.0
    -- style.Alpha =
    style.WindowPadding = imgui.ImVec2(4.0, 4.0)
    -- style.WindowMinSize =
    style.FramePadding = imgui.ImVec2(2.5, 3.5)
    -- style.ItemInnerSpacing =
    -- style.TouchExtraPadding =
    -- style.IndentSpacing =
    -- style.ColumnsMinSpacing = ?
    style.ButtonTextAlign = imgui.ImVec2(0.02, 0.4)
    -- style.DisplayWindowPadding =
    -- style.DisplaySafeAreaPadding =
    -- style.AntiAliasedLines =
    -- style.AntiAliasedShapes =
    -- style.CurveTessellationTol =
    colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
    colors[clr.WindowBg]               = imgui.ImColor(20, 20, 20, 255):GetVec4()
    colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
    colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.ComboBg]                = colors[clr.PopupBg]
    colors[clr.Border]                 = imgui.ImColor(40, 142, 110, 90):GetVec4()
    colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg]                = imgui.ImColor(40, 142, 110, 113):GetVec4()
    colors[clr.FrameBgHovered]         = imgui.ImColor(40, 142, 110, 164):GetVec4()
    colors[clr.FrameBgActive]          = imgui.ImColor(40, 142, 110, 255):GetVec4()
    colors[clr.TitleBg]                = imgui.ImColor(40, 142, 110, 236):GetVec4()
    colors[clr.TitleBgActive]          = imgui.ImColor(40, 142, 110, 236):GetVec4()
    colors[clr.TitleBgCollapsed]       = ImVec4(0.05, 0.05, 0.05, 0.79)
    colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
    colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
    colors[clr.ScrollbarGrab]          = imgui.ImColor(40, 142, 110, 236):GetVec4()
    colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
    colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
    colors[clr.CheckMark]              = ImVec4(1.00, 1.00, 1.00, 1.00)
    colors[clr.SliderGrab]             = ImVec4(0.28, 0.28, 0.28, 1.00)
    colors[clr.SliderGrabActive]       = ImVec4(0.35, 0.35, 0.35, 1.00)
    colors[clr.Button]                 = imgui.ImColor(35, 35, 35, 255):GetVec4()
    colors[clr.ButtonHovered]          = imgui.ImColor(35, 121, 93, 174):GetVec4()
    colors[clr.ButtonActive]           = imgui.ImColor(44, 154, 119, 255):GetVec4()
    colors[clr.Header]                 = imgui.ImColor(40, 142, 110, 255):GetVec4()
    colors[clr.HeaderHovered]          = ImVec4(0.34, 0.34, 0.35, 0.89)
    colors[clr.HeaderActive]           = ImVec4(0.12, 0.12, 0.12, 0.94)
    colors[clr.Separator]              = colors[clr.Border]
    colors[clr.SeparatorHovered]       = ImVec4(0.26, 0.59, 0.98, 0.78)
    colors[clr.SeparatorActive]        = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ResizeGrip]             = imgui.ImColor(40, 142, 110, 255):GetVec4()
    colors[clr.ResizeGripHovered]      = imgui.ImColor(35, 121, 93, 174):GetVec4()
    colors[clr.ResizeGripActive]       = imgui.ImColor(44, 154, 119, 255):GetVec4()
    colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
    colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
    colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg]         = ImVec4(0.26, 0.59, 0.98, 0.35)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.10, 0.10, 0.10, 0.35)
end
apply_custom_style()

local imBool = imgui.ImBool(false)
local imBool2 = imgui.ImBool(false)
local imBool3 = imgui.ImBool(false)
local imBool4 = imgui.ImBool(false)

function imgui.OnDrawFrame()
    local iScreenWidth, iScreenHeight = getScreenResolution()
    local tLastKeys = {}

   imgui.SetNextWindowPos(imgui.ImVec2(iScreenWidth / 2, iScreenHeight / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
   imgui.SetNextWindowSize(imgui.ImVec2(400, 200), imgui.Cond.FirstUseEver)

   imgui.Begin("Prison Helper", window)
           imgui.BeginChild('left pane', imgui.ImVec2(150, 0), true)
               if imgui.Button(u8"Для мл. состава", imgui.ImVec2(133, 35)) then
                vkladki[1] = true
                ini.settings.vkladka = 1
                inicfg.save(def, directIni)
            end
            if imgui.Button(u8"Для ст. состава", imgui.ImVec2(133, 35)) then
                vkladki[2] = true
                ini.settings.vkladka = 2
                inicfg.save(def, directIni)
            end
            if imgui.Button(u8"Для ст. состава", imgui.ImVec2(133, 35)) then
                vkladki[3] = true
                ini.settings.vkladka = 3
                inicfg.save(def, directIni)
            end
            if imgui.Button(u8"РП задания", imgui.ImVec2(133, 35)) then
                vkladki[4] = true
                ini.settings.vkladka = 4
                inicfg.save(def, directIni)
            end
        imgui.EndChild()
        if vkladki[2] == true then
        imgui.ToggleButton("Тест", imBool2)
        imgui.Text(u8("Ага да"))
        end
   imgui.End()
end

function imgui.TextQuestion(text)
    imgui.TextDisabled('(?)')
    if imgui.IsItemHovered() then
        imgui.BeginTooltip()
        imgui.PushTextWrapPos(450)
        imgui.TextUnformatted(text)
        imgui.PopTextWrapPos()
        imgui.EndTooltip()
    end
end
обращаешься к еще неинициализированной таблице ini
 
  • Нравится
Реакции: yeahbitch