Помогите в создании очень легкого скрипта

Статус
В этой теме нельзя размещать новые ответы.

Fhhxdd

Новичок
Автор темы
23
4
Версия SA-MP
  1. Любая
Я хочю создавать скрипты,учюсь
Помогите с созданием флудера у меня есть код и он не работает подскажыте что ни так


script_name('Flooder')
script_autor('fhhxdd')
script_description('Command')

require "lib.moonloader"

local tag = '[Pon]:'

function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end

while true do
wait(500)
sampAddChatMessage(tag .. "some text", 0xFFFFFF)

end
end
 
Решение
Спасибо огромное,очень помогли

Токо вот можешь обяснить как через консоль посмотреть проёбы?
Файл SF Integration.lua скачай с бх и сампфункс поставь если его нету.
Потом на англ раскладке нажмешь клавишу ~ или ё
И там смотри ошибку.
Вот это еще можешь почитать:

YarikVL

Известный
Проверенный
4,751
1,814
у меня есть код и он не работает подскажыте что ни так
Нужно прикреплять файл moonloader.log
script_name('Flooder')
script_autor('fhhxdd')
script_description('Command')

require "lib.moonloader"

local tag = '[Pon]:'

function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end

while true do
wait(500)
sampAddChatMessage(tag .. "some text", 0xFFFFFF)

end
end
Возможно проблема в:
wait(500)
Вместо этого попробуй:
wait(0)
🤔
 

Fhhxdd

Новичок
Автор темы
23
4
[18:25:35.001404] (system) Session started.
[18:25:35.001404] (debug) Module handle: 6BA50000

MoonLoader v.025-beta loaded.
Developers: FYP, hnnssy, EvgeN 1137

Copyright (c) 2016, BlastHack Team
https://www.blast.hk/moonloader/

[18:25:35.001404] (info) Working directory: C:\arz\Arizona Games Launcher\bin\arizona\moonloader
[18:25:35.001404] (debug) FP Control: 0109001F
[18:25:35.001404] (debug) Game: GTA SA 1.0.0.0 US
[18:25:35.001404] (system) Installing pre-game hooks...
[18:25:35.002404] (system) Hooks installed.
[18:25:37.654644] (debug) Initializing opcode handler table
[18:25:37.654644] (debug) package.path = C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?.lua;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?\init.lua;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\?.lua;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\?\init.lua;.\?.lua;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?.luac;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?\init.luac;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\?.luac;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\?\init.luac;.\?.luac
[18:25:37.654644] (debug) package.cpath = C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?.dll;
[18:25:37.655645] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\autoeat.lua'...
[18:25:37.656646] (debug) New script: 1095E704
[18:25:37.960670] (system) autoeat.lua: Loaded successfully.
[18:25:37.960670] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Central Cleaner(FINAL).lua'...
[18:25:37.961670] (debug) New script: 1095EB4C
[18:25:38.051678] (debug) Add thread 1095EEBD to SCM-thread queue
[18:25:38.099681] (system) Central Cleaner(FINAL): Loaded successfully.
[18:25:38.099681] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Climate.lua'...
[18:25:38.099681] (debug) New script: 1687EA6C
[18:25:38.134685] (system) Climate.lua: Loaded successfully.
[18:25:38.134685] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\finer.lua'...
[18:25:38.134685] (debug) New script: 1687EC14
[18:25:38.161687] (system) finer.lua: Loaded successfully.
[18:25:38.162685] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\PCheckerMLyc (1).lua'...
[18:25:38.162685] (debug) New script: 1687EDBC
[18:25:38.386705] (system) PCheckerMLyc (1).lua: Loaded successfully.
[18:25:38.386705] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Pervii skript.lua'...
[18:25:38.386705] (debug) New script: 01B2948C
[18:25:38.461710] (system) Flooder: Script terminated. (01B2948C)
[18:25:38.461710] (error) ... Games Launcher\bin\arizona\moonloader\Pervii skript.lua:2: attempt to call global 'script_autor' (a nil value)
stack traceback:
... Games Launcher\bin\arizona\moonloader\Pervii skript.lua:2: in main chunk
[18:25:38.462710] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\routes_recorder.lua'...
[18:25:38.462710] (debug) New script: 01B2948C
[18:25:38.525715] (system) routes recorder: Loaded successfully.
[18:25:38.525715] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Sampbinder.lua'...
[18:25:38.525715] (debug) New script: 18EAE63C
[18:25:38.577720] (system) Sampbinder.lua: Loaded successfully.
[18:25:38.577720] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\scriptManager.luac'...
[18:25:38.577720] (debug) New script: 18EAE7E4
[18:25:38.609723] (system) ScriptManager: Loaded successfully.
[18:25:38.609723] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\SF Integration.lua'...
[18:25:38.610724] (debug) New script: 18EAE98C
[18:25:38.632724] (system) SF Integration: Loaded successfully.
[18:25:38.632724] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Stroboscopes.lua'...
[18:25:38.632724] (debug) New script: 18EAEB34
[18:25:38.755734] (system) Stroboscopes: Loaded successfully.
[18:25:53.813033] (system) Installing post-load hooks...
[18:25:53.813033] (system) Hooks installed.
[18:25:53.814033] (debug) Add thread 18C09AED to SCM-thread queue
[18:25:56.810883] (debug) Add thread 1C928B95 to SCM-thread queue
[18:25:56.810883] (debug) Add thread 1C929A9D to SCM-thread queue
[18:25:56.810883] (debug) Add thread 1C92C8DD to SCM-thread queue
[18:25:56.816883] (debug) Add thread 1C92CB2D to SCM-thread queue
[18:25:56.871887] (debug) Add thread 1C92D90D to SCM-thread queue
[18:25:56.871887] (debug) Add thread 1C92E815 to SCM-thread queue
[18:25:56.871887] (debug) Add thread 1C92F155 to SCM-thread queue
[18:25:56.871887] (debug) Add thread 1C92F3A5 to SCM-thread queue
[18:28:23.255397] (system) Unloading...
[18:28:23.255397] (system) autoeat.lua: Script terminated. (1095E704)
[18:28:23.255397] (debug) Remove thread 1C92D90D from SCM-thread queue
[18:28:23.259397] (system) Central Cleaner(FINAL): Script terminated. (1095EB4C)
[18:28:23.259397] (debug) Remove thread 1C928B95 from SCM-thread queue
[18:28:23.261397] (system) Climate.lua: Script terminated. (1687EA6C)
[18:28:23.261397] (debug) Remove thread 1C929A9D from SCM-thread queue
[18:28:23.261397] (system) finer.lua: Script terminated. (1687EC14)
[18:28:23.261397] (debug) Remove thread 1C92C8DD from SCM-thread queue
[18:28:23.263398] (system) PCheckerMLyc (1).lua: Script terminated. (1687EDBC)
[18:28:23.265398] (system) routes recorder: Script terminated. (01B2948C)
[18:28:23.265398] (debug) Remove thread 1C92CB2D from SCM-thread queue
[18:28:23.266398] (system) Sampbinder.lua: Script terminated. (18EAE63C)
[18:28:23.266398] (debug) Remove thread 1C92E815 from SCM-thread queue
[18:28:23.269397] (system) ScriptManager: Script terminated. (18EAE7E4)
[18:28:23.269397] (debug) Remove thread 1C92F155 from SCM-thread queue
[18:28:23.270398] (system) SF Integration: Script terminated. (18EAE98C)
[18:28:23.270398] (debug) Remove thread 18C09AED from SCM-thread queue
[18:28:23.270398] (system) Stroboscopes: Script terminated. (18EAEB34)
[18:28:23.270398] (debug) Remove thread 1C92F3A5 from SCM-thread queue
[18:28:23.368408] (system) Session terminated.
[18:28:23.369407] (debug) Remove thread 1095EEBD from SCM-thread queue

вот

Как я понял когда скрипт загружается он сам должен флудить

название скрипта:Pervii skript.lua
 

YarikVL

Известный
Проверенный
4,751
1,814
[18:25:35.001404] (system) Session started.
[18:25:35.001404] (debug) Module handle: 6BA50000

MoonLoader v.025-beta loaded.
Developers: FYP, hnnssy, EvgeN 1137

Copyright (c) 2016, BlastHack Team

[18:25:35.001404] (info) Working directory: C:\arz\Arizona Games Launcher\bin\arizona\moonloader
[18:25:35.001404] (debug) FP Control: 0109001F
[18:25:35.001404] (debug) Game: GTA SA 1.0.0.0 US
[18:25:35.001404] (system) Installing pre-game hooks...
[18:25:35.002404] (system) Hooks installed.
[18:25:37.654644] (debug) Initializing opcode handler table
[18:25:37.654644] (debug) package.path = C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?.lua;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?\init.lua;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\?.lua;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\?\init.lua;.\?.lua;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?.luac;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?\init.luac;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\?.luac;C:\arz\Arizona Games Launcher\bin\arizona\moonloader\?\init.luac;.\?.luac
[18:25:37.654644] (debug) package.cpath = C:\arz\Arizona Games Launcher\bin\arizona\moonloader\lib\?.dll;
[18:25:37.655645] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\autoeat.lua'...
[18:25:37.656646] (debug) New script: 1095E704
[18:25:37.960670] (system) autoeat.lua: Loaded successfully.
[18:25:37.960670] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Central Cleaner(FINAL).lua'...
[18:25:37.961670] (debug) New script: 1095EB4C
[18:25:38.051678] (debug) Add thread 1095EEBD to SCM-thread queue
[18:25:38.099681] (system) Central Cleaner(FINAL): Loaded successfully.
[18:25:38.099681] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Climate.lua'...
[18:25:38.099681] (debug) New script: 1687EA6C
[18:25:38.134685] (system) Climate.lua: Loaded successfully.
[18:25:38.134685] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\finer.lua'...
[18:25:38.134685] (debug) New script: 1687EC14
[18:25:38.161687] (system) finer.lua: Loaded successfully.
[18:25:38.162685] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\PCheckerMLyc (1).lua'...
[18:25:38.162685] (debug) New script: 1687EDBC
[18:25:38.386705] (system) PCheckerMLyc (1).lua: Loaded successfully.
[18:25:38.386705] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Pervii skript.lua'...
[18:25:38.386705] (debug) New script: 01B2948C
[18:25:38.461710] (system) Flooder: Script terminated. (01B2948C)
[18:25:38.461710] (error) ... Games Launcher\bin\arizona\moonloader\Pervii skript.lua:2: attempt to call global 'script_autor' (a nil value)
stack traceback:
... Games Launcher\bin\arizona\moonloader\Pervii skript.lua:2: in main chunk
[18:25:38.462710] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\routes_recorder.lua'...
[18:25:38.462710] (debug) New script: 01B2948C
[18:25:38.525715] (system) routes recorder: Loaded successfully.
[18:25:38.525715] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Sampbinder.lua'...
[18:25:38.525715] (debug) New script: 18EAE63C
[18:25:38.577720] (system) Sampbinder.lua: Loaded successfully.
[18:25:38.577720] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\scriptManager.luac'...
[18:25:38.577720] (debug) New script: 18EAE7E4
[18:25:38.609723] (system) ScriptManager: Loaded successfully.
[18:25:38.609723] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\SF Integration.lua'...
[18:25:38.610724] (debug) New script: 18EAE98C
[18:25:38.632724] (system) SF Integration: Loaded successfully.
[18:25:38.632724] (system) Loading script 'C:\arz\Arizona Games Launcher\bin\arizona\moonloader\Stroboscopes.lua'...
[18:25:38.632724] (debug) New script: 18EAEB34
[18:25:38.755734] (system) Stroboscopes: Loaded successfully.
[18:25:53.813033] (system) Installing post-load hooks...
[18:25:53.813033] (system) Hooks installed.
[18:25:53.814033] (debug) Add thread 18C09AED to SCM-thread queue
[18:25:56.810883] (debug) Add thread 1C928B95 to SCM-thread queue
[18:25:56.810883] (debug) Add thread 1C929A9D to SCM-thread queue
[18:25:56.810883] (debug) Add thread 1C92C8DD to SCM-thread queue
[18:25:56.816883] (debug) Add thread 1C92CB2D to SCM-thread queue
[18:25:56.871887] (debug) Add thread 1C92D90D to SCM-thread queue
[18:25:56.871887] (debug) Add thread 1C92E815 to SCM-thread queue
[18:25:56.871887] (debug) Add thread 1C92F155 to SCM-thread queue
[18:25:56.871887] (debug) Add thread 1C92F3A5 to SCM-thread queue
[18:28:23.255397] (system) Unloading...
[18:28:23.255397] (system) autoeat.lua: Script terminated. (1095E704)
[18:28:23.255397] (debug) Remove thread 1C92D90D from SCM-thread queue
[18:28:23.259397] (system) Central Cleaner(FINAL): Script terminated. (1095EB4C)
[18:28:23.259397] (debug) Remove thread 1C928B95 from SCM-thread queue
[18:28:23.261397] (system) Climate.lua: Script terminated. (1687EA6C)
[18:28:23.261397] (debug) Remove thread 1C929A9D from SCM-thread queue
[18:28:23.261397] (system) finer.lua: Script terminated. (1687EC14)
[18:28:23.261397] (debug) Remove thread 1C92C8DD from SCM-thread queue
[18:28:23.263398] (system) PCheckerMLyc (1).lua: Script terminated. (1687EDBC)
[18:28:23.265398] (system) routes recorder: Script terminated. (01B2948C)
[18:28:23.265398] (debug) Remove thread 1C92CB2D from SCM-thread queue
[18:28:23.266398] (system) Sampbinder.lua: Script terminated. (18EAE63C)
[18:28:23.266398] (debug) Remove thread 1C92E815 from SCM-thread queue
[18:28:23.269397] (system) ScriptManager: Script terminated. (18EAE7E4)
[18:28:23.269397] (debug) Remove thread 1C92F155 from SCM-thread queue
[18:28:23.270398] (system) SF Integration: Script terminated. (18EAE98C)
[18:28:23.270398] (debug) Remove thread 18C09AED from SCM-thread queue
[18:28:23.270398] (system) Stroboscopes: Script terminated. (18EAEB34)
[18:28:23.270398] (debug) Remove thread 1C92F3A5 from SCM-thread queue
[18:28:23.368408] (system) Session terminated.
[18:28:23.369407] (debug) Remove thread 1095EEBD from SCM-thread queue

вот

Как я понял когда скрипт загружается он сам должен флудить

название скрипта:Pervii skript.lua
Pervii skript.lua:2: attempt to call global 'script_autor' (a nil value)
То есть надо правильно писать англ слова:
script_author("text")
 

Fhhxdd

Новичок
Автор темы
23
4
Pervii skript.lua:2: attempt to call global 'script_autor' (a nil value)
То есть надо правильно писать англ слова:
script_author("text")
Я тебя не понял,я тупой обясни подробней

В консоли можно смотреть где что не так, и тестировать свои исправления, я так тоже ебался но чтобы не писать на бх чекал через консоль
как?
 

YarikVL

Известный
Проверенный
4,751
1,814
Спасибо огромное,очень помогли

Токо вот можешь обяснить как через консоль посмотреть проёбы?
Файл SF Integration.lua скачай с бх и сампфункс поставь если его нету.
Потом на англ раскладке нажмешь клавишу ~ или ё
И там смотри ошибку.
Вот это еще можешь почитать:
 
Статус
В этой теме нельзя размещать новые ответы.