Вы используете устаревший браузер. Этот и другие сайты могут отображаться в нём некорректно. Вам необходимо обновить браузер или попробовать использовать другой.
notify.lua: import 'lib_imgui_notf.lua' not found.
stack traceback:
[C]: in function 'import'
F:\GTA San Andreas\moonloader\notify.lua:6: in main chunk
require "lib.moonloader"
local keys = require "vkeys"
local inicfg = require 'inicfg'
local imgui = require "imgui"
local sampev = require "lib.samp.events"
local notf = import 'lib_imgui_notf.lua'
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("notify", test_notify)
_, id = sampGetPlayerIdByCharHandle(PLAYER_PED)
nick = sampGetPlayerNickname(id)
while true do
wait(0)
end
end
function test_notify(arg)
notify.addNotification("Привет", "Как ваши дела?", 2, 1, 3)
end
вот что в игре
[ML] (error) notify.lua: F:\GTA San Andreas\moonloader\notify.lua:23: attempt to index global 'notify' (a nil value)
stack traceback:
F:\GTA San Andreas\moonloader\notify.lua:23: in function <F:\GTA San Andreas\moonloader\notify.lua:22>
[ML] (error) notify.lua: Script died due to an error. (0F9B18DC)
[ML] (error) lib_imgui_notf.lua: cannot resume non-suspended coroutine
stack traceback:
[C]: in function 'SetMouseCursor'
F:\GTA San Andreas\moonloader\lib_imgui_notf.lua:103: in function <F:\GTA San Andreas\moonloader\lib_imgui_notf.lua:99>
[ML] (error) lib_imgui_notf.lua: Script died due to an error. (0F9B0FAC)
Ты в функции обращаешься к ней как notify, хотя ты объявил её как notf local notf = import 'lib_imgui_notf.lua'. Попробуй сделать как-то так: notf.addNotification("Привет", "Как ваши дела?", 2, 1, 3)
Ты в функции обращаешься к ней как notify, хотя ты объявил её как notf local notf = import 'lib_imgui_notf.lua'. Попробуй сделать как-то так: notf.addNotification("Привет", "Как ваши дела?", 2, 1, 3)
так, теперь в сампфунксе осталась одна ошибка
[ML] (error) lib_imgui_notf.lua: F:\GTA San Andreas\moonloader\lib_imgui_notf.lua:121: attempt to compare number with string
stack traceback:
F:\GTA San Andreas\moonloader\lib_imgui_notf.lua:121: in function 'onRenderNotification'
F:\GTA San Andreas\moonloader\lib_imgui_notf.lua:109: in function 'OnDrawFrame'
F:\GTA San Andreas\moonloader\lib\imgui.lua:1378: in function <F:\GTA San Andreas\moonloader\lib\imgui.lua:1367>
[ML] (error) lib_imgui_notf.lua: Script died due to an error. (0F9B12BC)
файл, который скинул Albertio