- 10
- 0
- Версия MoonLoader
- .027.0-preview
Помогите, не работает чекбокс в мимгуи, вот код:
Вот лог монетлоадера:
[17:36:55.319027] (system)
* MonetLoader initialized! Version: 3.0.0-os
* Official Telegram: t.me/MonetLoader
[17:36:55.441535] (system) Loading script: '/storage/emulated/0/Android/data/com.arizona.game/monetloader/test - Copy.lua'...
[17:36:55.491489] (system) Test: Loaded successfully.
[17:36:55.908703] (error) Test: ...ndroid/data/com.arizona.game/monetloader/test - Copy.lua:61: wrong number of arguments for function call
stack traceback:
[C]: in function 'Checkbox'
...ndroid/data/com.arizona.game/monetloader/test - Copy.lua:61: in function '_draw'
./lib/mimgui/init.lua:100: in function <./lib/mimgui/init.lua:84>
[17:36:55.908763] (error) Test: Script died due to an error.
Script:
script_name("Test")
script_author("555Maxim555")
require "lib.moonloader"
local imgui = require 'mimgui'
local fa = require 'fAwesome6_solid'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local new = imgui.new
local renderWindow = new.bool
local renerWindow = false
local sizeX, sizeY = getScreenResolution()
local vkladka = "1"
local salo = new.bool
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("lm", lmmenu)
while true do
wait(0)
end
end
imgui.OnInitialize(function()
fa.Init()
end)
local newFrame = imgui.OnFrame(
function() return renderWindow[0] end,
function(player)
imgui.SetNextWindowPos(imgui.ImVec2(sizeX / 2, sizeY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(200, 154), imgui.Cond.FirstUseEver, imgui.WindowFlags.NoResize)
imgui.Begin("test")
imgui.Text(" ")
imgui.SameLine()
if imgui.BeginChild("Vkladki", imgui.ImVec2(575, 100), true) then
if imgui.Button(fa.EYE .. " Visual", imgui.ImVec2(130, 80)) then
vkladka = "1"
end
imgui.SameLine()
if imgui.Button(fa.BOLT .. " Combat", imgui.ImVec2(130, 80)) then
vkladka = "2"
end
imgui.SameLine()
if imgui.Button(fa.PERSON .. " Movement", imgui.ImVec2(136,80)) then
vkladka = "3"
end
imgui.SameLine()
if imgui.Button(fa.LINK .. " Misc", imgui.ImVec2(136, 80)) then
vkladka = "4"
end
imgui.EndChild()
end
imgui.Text(" ")
imgui.SameLine()
if imgui.BeginChild("functions", imgui.ImVec2(575, 250), true) then
imgui.Checkbox('test')
if vkladka == "1" then
imgui.Text("Vkladka1")
elseif vkladka == "2" then
imgui.Text("Vkladka2")
elseif vkladka == "3" then
imgui.Text("Vkladka3")
elseif vkladka == "4" then
imgui.Text("Vkladka4")
end
imgui.EndChild()
end
imgui.End()
end
)
function lmmenu()
renderWindow[0] = not renderWindow[0]
end
Вот лог монетлоадера:
[17:36:55.319027] (system)
* MonetLoader initialized! Version: 3.0.0-os
* Official Telegram: t.me/MonetLoader
[17:36:55.441535] (system) Loading script: '/storage/emulated/0/Android/data/com.arizona.game/monetloader/test - Copy.lua'...
[17:36:55.491489] (system) Test: Loaded successfully.
[17:36:55.908703] (error) Test: ...ndroid/data/com.arizona.game/monetloader/test - Copy.lua:61: wrong number of arguments for function call
stack traceback:
[C]: in function 'Checkbox'
...ndroid/data/com.arizona.game/monetloader/test - Copy.lua:61: in function '_draw'
./lib/mimgui/init.lua:100: in function <./lib/mimgui/init.lua:84>
[17:36:55.908763] (error) Test: Script died due to an error.