- 30
- 0
- Версия MoonLoader
- .027.0-preview
Script:
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage("{FF2020}[Test] {FFF101}is successfull loaded! Use /test")
sampRegisterChatCommand("test",test)
wait(-1)
end
function test(arg)
local _, handle = sampGetCharHandleBySampPlayerId(arg)
x,y,z = getCharCoordinates(handle)
placeWaypoint(x, y, z)
end
error:
[13:45:44.567804] (system) test.lua: Loaded successfully.
[13:45:46.430924] (error) test.lua: opcode '00A0' call caused an unhandled exception
stack traceback:
[C]: in function 'getCharCoordinates'
D:\SAMP\moonloader\test.lua:12: in function <D:\SAMP\moonloader\test.lua:10>
[13:45:46.431924] (error) test.lua: Script died due to an error. (0C8E72AC)
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage("{FF2020}[Test] {FFF101}is successfull loaded! Use /test")
sampRegisterChatCommand("test",test)
wait(-1)
end
function test(arg)
local _, handle = sampGetCharHandleBySampPlayerId(arg)
x,y,z = getCharCoordinates(handle)
placeWaypoint(x, y, z)
end
error:
[13:45:44.567804] (system) test.lua: Loaded successfully.
[13:45:46.430924] (error) test.lua: opcode '00A0' call caused an unhandled exception
stack traceback:
[C]: in function 'getCharCoordinates'
D:\SAMP\moonloader\test.lua:12: in function <D:\SAMP\moonloader\test.lua:10>
[13:45:46.431924] (error) test.lua: Script died due to an error. (0C8E72AC)