есть ли аналог os.date?

Vespan

loneliness
Автор темы
Проверенный
2,102
1,631
Версия MoonLoader
.026-beta
А то у меня просто крашит скрипт ...
Lua:
--[[
moonloader.log
[18:50:00.030228] (script)    Telegram Control SAMP (TCS): {00c8ff}<[Telegram Control SAMP]{FFFFFF}:[18:50:00][Samp | PayDay]:
Щас пейдей будет!
(таймер выставлен на 50 минут){00c8ff}>
[18:50:41.949982] (error)    Telegram Control SAMP (TCS): cannot resume non-suspended coroutine
stack traceback:
    D:\GTASHKA\moonloader\Telegram Control SAMP.lua: in function <D:\GTASHKA\moonloader\Telegram Control SAMP.lua:1226>
[18:50:41.951980] (script)    Telegram Control SAMP (TCS): {00c8ff}<[Telegram Control SAMP]{FFFFFF}:[18:50:41][SAMP | Disconected]:
Вы вышли из игры{00c8ff}>
[18:50:41.955977] (error)    Telegram Control SAMP (TCS): Script died due to an error. (0A23B734)

]]
--
while true do wait(0)
    if ToggleButton.PayDay.v and os.date("%M:%S") == ImInt.DoPayDaya.v .. ':00' then
        --sendTelegramNotificationFlood('[SAMP | PayDay]:\n ' .. ImInt.DoPayDaya.v .. ' Минут До PayDaя!')       
        sendTelegramNotificationFlood("[Samp | PayDay]:\nЩас пейдей будет!\n(таймер выставлен на " .. ImInt.DoPayDaya.v .. ' минут)')
        wait(1000)
    end
end --после 3-5 минут = краш
 

neverlessy

Потрачен
170
121
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
cannot resume non-suspended coroutine

создавай поток
Lua:
while true do wait(0)
    if ToggleButton.PayDay.v and os.date("%M:%S") == ImInt.DoPayDaya.v .. ':00' then
        lua_thread.create(function()
            sendTelegramNotificationFlood("[Samp | PayDay]:\nЩас пейдей будет!\n(таймер выставлен на " .. ImInt.DoPayDaya.v .. ' минут)')
            wait(1000)
        end)
    end
end