Помогите со скриптом!!!!!

backloop

Участник
Автор темы
152
14
пишу скрипт на сокращения команды /get guns на /gg и вот у меня проблема как у же не закрывал код вылазит ошибка пожалуйста помогите со скриптом вот код:
Lua:
local hook = require 'lib.samp.events'

function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do
        wait(0)
        sampRegisterChatCommand('gg', function(num)
                    if num ~= nil then
                    sampSendChat('/get guns '..num)
                end
 
Решение
[20:56:38.189818] (system) Loading script 'D:\games\GTA 130K BY DAPO SHOW\moonloader\gg.lua'...
[20:56:38.189818] (debug) New script: 07AC33FC
[20:56:38.189818] (error) gg.lua: D:\games\GTA 130K BY DAPO SHOW\moonloader\gg.lua:9: unexpected symbol near ')'
[20:56:38.189818] (error) gg.lua: Script died due to an error. (07AC33FC)
это с твоим кодом
С телефона писал, енд потерял

Lua:
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
  sampRegisterChatCommand('gg', function(num)
    if num ~= nil then
      sampSendChat('/get guns '..num)
    end
  end)
  while true do
    wait(0)
  end
end

Fott

Простреленный
3,435
2,279
пишу скрипт на сокращения команды /get guns на /gg и вот у меня проблема как у же не закрывал код вылазит ошибка пожалуйста помогите со скриптом вот код:
Lua:
local hook = require 'lib.samp.events'

function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    while true do
        wait(0)
        sampRegisterChatCommand('gg', function(num)
                    if num ~= nil then
                    sampSendChat('/get guns '..num)
                end
попробуй так, если не сработает скинь moonloader.log
Lua:
local hook = require 'lib.samp.events'

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

  while true do
  wait(0)
    sampRegisterChatCommand('gg', function(num))
      if num ~= nil then
    sampSendChat('/get guns '..num)
    end
  end
end
Слыште, два гения, вы нахуя команду в беск цикле регистрируете?
Lua:
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('gg', function(num)
    if num ~= nil then
        sampSendChat('/get guns '..num)
    end
    while true do
    wait(0)
    end
end
 

backloop

Участник
Автор темы
152
14
Слыште, два гения, вы нахуя команду в беск цикле регистрируете?
Lua:
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('gg', function(num)
    if num ~= nil then
        sampSendChat('/get guns '..num)
    end
    while true do
    wait(0)
    end
end
[20:56:38.189818] (system) Loading script 'D:\games\GTA 130K BY DAPO SHOW\moonloader\gg.lua'...
[20:56:38.189818] (debug) New script: 07AC33FC
[20:56:38.189818] (error) gg.lua: D:\games\GTA 130K BY DAPO SHOW\moonloader\gg.lua:9: unexpected symbol near ')'
[20:56:38.189818] (error) gg.lua: Script died due to an error. (07AC33FC)
это с твоим кодом
 

Fott

Простреленный
3,435
2,279
[20:56:38.189818] (system) Loading script 'D:\games\GTA 130K BY DAPO SHOW\moonloader\gg.lua'...
[20:56:38.189818] (debug) New script: 07AC33FC
[20:56:38.189818] (error) gg.lua: D:\games\GTA 130K BY DAPO SHOW\moonloader\gg.lua:9: unexpected symbol near ')'
[20:56:38.189818] (error) gg.lua: Script died due to an error. (07AC33FC)
это с твоим кодом
С телефона писал, енд потерял

Lua:
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
  sampRegisterChatCommand('gg', function(num)
    if num ~= nil then
      sampSendChat('/get guns '..num)
    end
  end)
  while true do
    wait(0)
  end
end
 
  • Нравится
Реакции: backloop

backloop

Участник
Автор темы
152
14
С телефона писал, енд потерял

Lua:
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
  sampRegisterChatCommand('gg', function(num)
    if num ~= nil then
      sampSendChat('/get guns '..num)
    end
  end)
  while true do
    wait(0)
  end
end
спасибо тебе чел большое