Проблема с wait

Foxy01

Известный
Автор темы
284
125
Версия SA-MP
  1. 0.3.7 (R1)
Проблемы с wait
Когда я его добавляю то крашит все
[ML] (error) kladpoc — копия.lua: C:\Games\GTA NFS EDITION\moonloader\kladpoc — копия.lua:16: attempt to yield across C-call boundary
stack traceback:
[C]: in function 'wait'
C:\Games\GTA NFS EDITION\moonloader\kladpoc — копия.lua:16: in function 'callback'
...ames\GTA NFS EDITION\moonloader\lib\samp\events\core.lua:79: in function <...ames\GTA NFS EDITION\moonloader\lib\samp\events\core.lua:53>
[ML] (error) kladpoc — копия.lua: Script died due to an error. (3E052B44)

Пожалуйста помогите решить проблему краша
(на название не смотрите, по фану)​
 

Вложения

  • kladpoc — копия.lua
    721 байт · Просмотры: 8
Решение
Lua:
require'lib.moonloader'
local requests = require 'requests'
requests.http_socket, requests.https_socket = http, http
local lanes = require('lanes').configure()
local encoding = require 'encoding'
local s = require "lib.samp.events"
local hook = require "samp.events"
local allmoney, allroute, FONT, skipmsgg = 0, 0, renderCreateFont('Verdana', 12, 9), 'off'

function s.onServerMessage(color, msg)
    lua_thread.create(function()
        if msg:find('�������� �����, ��� �� ������� ���������.') then
            sampProcessChatInput("/spback")
        elseif msg:find('SMS: �������! ������ ���� � �� ���.') then
            sampProcessChatInput("/ztpc")
        elseif msg:find('����������') then
            wait(100)...

chapo

🫡 В армии с 17.10.2023. В ЛС НЕ ОТВЕЧАЮ
Друг
8,778
11,221
Lua:
require'lib.moonloader'
local requests = require 'requests'
requests.http_socket, requests.https_socket = http, http
local lanes = require('lanes').configure()
local encoding = require 'encoding'
local s = require "lib.samp.events"
local hook = require "samp.events"
local allmoney, allroute, FONT, skipmsgg = 0, 0, renderCreateFont('Verdana', 12, 9), 'off'

function s.onServerMessage(color, msg)
    lua_thread.create(function()
        if msg:find('�������� �����, ��� �� ������� ���������.') then
            sampProcessChatInput("/spback")
        elseif msg:find('SMS: �������! ������ ���� � �� ���.') then
            sampProcessChatInput("/ztpc")
        elseif msg:find('����������') then
            wait(100)
            sampProcessChatInput("/a")
        end
    end)
end
 
  • Влюблен
Реакции: Foxy01