Ошибка при минимальном скрипте

Descoded

Известный
Автор темы
17
0
Версия SA-MP
  1. 0.3.7-R3
Ошибка
[ML] (error) fwa.lua: cannot resume non-suspended coroutine
stack traceback:
[C]: in function 'getCharPlayerIsTargeting'
...RP\Arizona Games Launcher\bin\arizona\moonloader\fwa.lua:6: in function <...RP\Arizona Games Launcher\bin\arizona\moonloader\fwa.lua:1>
[ML] (error) fwa.lua: Script died due to an error. (4E6A47BC)
При минимальном коде:
function main()
while not isSampAvailable() do wait(100) end

while true do
wait(1000)
local result, ped = getCharPlayerIsTargeting(PLAYER_PED)
print("Target result:", result)
end
end
 

Descoded

Известный
Автор темы
17
0
[ML] (error) fwa.lua: cannot resume non-suspended coroutine
stack traceback:
[C]: in function 'getCharPlayerIsTargeting'
...RP\Arizona Games Launcher\bin\arizona\moonloader\fwa.lua:6: in function <...RP\Arizona Games Launcher\bin\arizona\moonloader\fwa.lua:1>
[ML] (error) fwa.lua: Script died due to an error. (124FAC9C)
попробуй так

Lua:
function main()
    while not isSampAvailable() do wait(0) end

    while true do
        wait(1000)
        local result, ped = getCharPlayerIsTargeting(PLAYER_PED)
        if result then
            print("Target result:", result)
        else
            print("ощибька")
        end
    end
end