- 1,092
- 296
- Версия MoonLoader
- .026-beta
Код:
Ошибка:
Помогите пж
Lua:
require('moonloader')
local ffi = require 'ffi'
local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local new, str, sizeof = imgui.new, ffi.string, ffi.sizeof
local renderWindow = new.bool(false)
local combo = new.int(1)
local combo_table = {u8'Картофель-Фри', u8'Биг-Мак'}
imgui.OnInitialize(function()
imgui.GetIO().IniFilename = nil
end)
local newFrame = imgui.OnFrame(
function() return renderWindow[0] end,
function(player)
local resX, resY = getScreenResolution()
local sizeX, sizeY = 300, 300
imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
imgui.Begin('Main Window', renderWindow)
imgui.Combo('Combo', combo, combo_table)
imgui.End()
end
)
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('mimgui', function()
renderWindow[0] = not renderWindow[0]
end)
wait(-1)
end
Ошибка:
Lua:
[ML] (error) testthemes.lua: D:\Babetape_LetoGTA\moonloader\testthemes.lua:28: bad argument #3 to 'Combo' (cannot convert 'table' to 'const char *const *')
stack traceback:
[C]: in function 'Combo'
D:\Babetape_LetoGTA\moonloader\testthemes.lua:28: in function '_draw'
D:\Babetape_LetoGTA\moonloader\lib\mimgui\init.lua:102: in function <D:\Babetape_LetoGTA\moonloader\lib\mimgui\init.lua:86>
[ML] (error) testthemes.lua: Script died due to an error. (0BF9EC0C)
Помогите пж