Что делать если скрипт не работает и выдает ошибку
[20:52:08.202709] (system) Loading script 'E:\Games\GTA San Andreas\moonloader\Ghetto Life.lua'...
[20:52:08.202709] (debug) New script: 0195F60C
[20:52:08.202709] (error) Ghetto Life.lua: E:\Games\GTA San Andreas\moonloader\Ghetto Life.lua:15: 'then' expected near 'dia'
[20:52:08.202709] (error) Ghetto Life.lua: Script died due to an error. (0195F60C)
script_name("Ghetto Life")
script_author("VAP4ik")
script_version("v1")
script_description("3")
script_dependencies("SAMPFUNCS")
require "lib.moonloader"
function main()
print("Ghetto Loaded")
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while true do
wait(1000)
if isKeyDown(VK_RBUTTON)
dia = sampShowDialog(17, string.format("{FE0000}Ghetto Life by {7C07A9}VAP4ik", name, id), string.format("/n1. {00AA6E}юзать 15 грамм \n2.{FF7400}для ломки 1 \n3 {5C0DAC}купить 150грамм \n4. {FF1300}/anim 0 \n5. {00BD39}чекать онлайн \n6. {1B1BB3}Warehouse \n7. {000000}Clist 0 \n8. {C30084}/materials get,put \n9. {6e6057}/healme /n10. {F2FF00}Get Guns 500 \n11.{FF0090}Capture , "вперед", "назад", 2)
sampSetCurrentDialogListItem(0)
repeat
wait(1000)
re, button, list, input = sampHasDialogRespond(17)
until re
_, id = sampGetPlayerIdByCharHandle(playerPed)
if button == 0 then
_ = sampCloseCurrentDialogWithButton()
else
if list == 1 then
sampSendChat("/usedrugs 15")
wait(1000)
if list == 2 then
sampSendChat("/usedrugs 1")
wait(1000)
if list == 3 then
sampSendChat("/get drugs 150")
wait(1000)
end
if list == 4 then
sampSendChat("/anim 0")
wait(1000)
end
if list == 5 then
sampSendChat("/members")
wait(1000)
end
if list == 6 then
sampSendChat("/warehouse")
wait(1000)
end
if list == 7 then
sampSendChat("/clist 0")
wait(1000)
end
if list == 8 then
sampSendChat("/materials get")
wait(6000)
sampSendChat("/materials put")
end
if list == 9 then
sampSendChat("/healme")
end
if list == 10 then
sampSendChat("/get guns 500")
end
if list == 11 then
sampSendChat("/capture")
wait(500)
repeat
end
end
[20:52:08.202709] (system) Loading script 'E:\Games\GTA San Andreas\moonloader\Ghetto Life.lua'...
[20:52:08.202709] (debug) New script: 0195F60C
[20:52:08.202709] (error) Ghetto Life.lua: E:\Games\GTA San Andreas\moonloader\Ghetto Life.lua:15: 'then' expected near 'dia'
[20:52:08.202709] (error) Ghetto Life.lua: Script died due to an error. (0195F60C)
script_name("Ghetto Life")
script_author("VAP4ik")
script_version("v1")
script_description("3")
script_dependencies("SAMPFUNCS")
require "lib.moonloader"
function main()
print("Ghetto Loaded")
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while true do
wait(1000)
if isKeyDown(VK_RBUTTON)
dia = sampShowDialog(17, string.format("{FE0000}Ghetto Life by {7C07A9}VAP4ik", name, id), string.format("/n1. {00AA6E}юзать 15 грамм \n2.{FF7400}для ломки 1 \n3 {5C0DAC}купить 150грамм \n4. {FF1300}/anim 0 \n5. {00BD39}чекать онлайн \n6. {1B1BB3}Warehouse \n7. {000000}Clist 0 \n8. {C30084}/materials get,put \n9. {6e6057}/healme /n10. {F2FF00}Get Guns 500 \n11.{FF0090}Capture , "вперед", "назад", 2)
sampSetCurrentDialogListItem(0)
repeat
wait(1000)
re, button, list, input = sampHasDialogRespond(17)
until re
_, id = sampGetPlayerIdByCharHandle(playerPed)
if button == 0 then
_ = sampCloseCurrentDialogWithButton()
else
if list == 1 then
sampSendChat("/usedrugs 15")
wait(1000)
if list == 2 then
sampSendChat("/usedrugs 1")
wait(1000)
if list == 3 then
sampSendChat("/get drugs 150")
wait(1000)
end
if list == 4 then
sampSendChat("/anim 0")
wait(1000)
end
if list == 5 then
sampSendChat("/members")
wait(1000)
end
if list == 6 then
sampSendChat("/warehouse")
wait(1000)
end
if list == 7 then
sampSendChat("/clist 0")
wait(1000)
end
if list == 8 then
sampSendChat("/materials get")
wait(6000)
sampSendChat("/materials put")
end
if list == 9 then
sampSendChat("/healme")
end
if list == 10 then
sampSendChat("/get guns 500")
end
if list == 11 then
sampSendChat("/capture")
wait(500)
repeat
end
end