Помогите начинающему кодеру)

Valera1223

Потрачен
Автор темы
51
8
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия MoonLoader
.026-beta
Суть ошибки из лога:

[16:09:33.281281] (system) tp.lua: Loaded successfully.
[16:09:47.355710] (system) Installing post-load hooks...
[16:09:47.356705] (system) Hooks installed.
[16:09:47.356705] (error) tp.lua: D:\GTA San Andreas MultiPlayer228\moonloader\tp.lua:2: attempt to call global 'isSampAvailable' (a nil value)
stack traceback:
D:\GTA San Andreas MultiPlayer228\moonloader\tp.lua: in function <D:\GTA San Andreas MultiPlayer228\moonloader\tp.lua:1>
[16:09:47.356705] (error) tp.lua: Script died due to an error. (109E722C)
[16:10:07.541833] (system) Unloading...
[16:10:07.557823] (system) Session terminated.

Сам код:
function main()
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("htp",command)
while true do wait(0) end end

function command()
bool,x,y,z = getTargetBlipCoordinates()
if bool then setCharCoordinates(playerPed,x,y,z) end end
 

imring

Ride the Lightning
Всефорумный модератор
2,361
2,546
Подключи sampfuncs или moonloader, не помню.
Lua:
require "lib.moonloader"
require "lib.sampfuncs"
а они зачем

Суть ошибки из лога:

[16:09:33.281281] (system) tp.lua: Loaded successfully.
[16:09:47.355710] (system) Installing post-load hooks...
[16:09:47.356705] (system) Hooks installed.
[16:09:47.356705] (error) tp.lua: D:\GTA San Andreas MultiPlayer228\moonloader\tp.lua:2: attempt to call global 'isSampAvailable' (a nil value)
stack traceback:
D:\GTA San Andreas MultiPlayer228\moonloader\tp.lua: in function <D:\GTA San Andreas MultiPlayer228\moonloader\tp.lua:1>
[16:09:47.356705] (error) tp.lua: Script died due to an error. (109E722C)
[16:10:07.541833] (system) Unloading...
[16:10:07.557823] (system) Session terminated.

Сам код:
function main()
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("htp",command)
while true do wait(0) end end

function command()
bool,x,y,z = getTargetBlipCoordinates()
if bool then setCharCoordinates(playerPed,x,y,z) end end
скачай sampfuncs (https://blast.hk/sampfuncs)