- Версия MoonLoader
- .026-beta
Lua:
----------------lib----------------
require "lib.moonloader"
local ev = require("lib.samp.events")
----------------local----------------
local tag = '{0000FF} [TP by Ega] {000000}- '
local bool = false
----------------main----------------
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage(tag .. '{3333ff}TP by Ega {FFFFFF}успешно загружен. ', -1)
sampRegisterChatCommand('bool', function() bool = not bool printStringNow(bool and 'on' or 'off', 1000) end)
wait(-1)
end
----------------function----------------
function ev.onSetPlayerPos(position)
if bool then
local result, x, y, z = getTargetBlipCoordinates()
if result then
position = x,y,z
return {position}
end
end
end
Код:
[23:04:49.387372] (error) TP: ...ga\ega lowpc\moonloader\lib\samp\events\bitstream_io.lua:208: attempt to index local 'value' (a number value)
stack traceback:
...ga\ega lowpc\moonloader\lib\samp\events\bitstream_io.lua:208: in function 'write'
...НОЕ!!!\ega\ega lowpc\moonloader\lib\samp\events\core.lua:44: in function 'write_data'
...НОЕ!!!\ega\ega lowpc\moonloader\lib\samp\events\core.lua:91: in function <...НОЕ!!!\ega\ega lowpc\moonloader\lib\samp\events\core.lua:53>
[23:04:49.564400] (error) TP: Script died due to an error. (3A879A0C)
Из-за чего краш?
Вложения
Последнее редактирование: