Jump to content
Tezter

Please, can anyone help me out finding a small bug in my script.

Recommended Posts

Hi, everyone who's reading this question.   PLease can anyone help me  with this script so I can finish it up. I would really appreciate your help.
I have small bug in my script. I think it will be easy for someone who has a lot of experience in Lua scripting.

I can run the script fine, until I cancel running a piece of the code and then it crash .
I added some pictures for better explanation.

I can run Crate Hack Menu fine

Menu 1 Pic

In this menu I choose for Challenge Points Hack. Everything still work fine.

Menu 2 Pic

If I would cancel here. the menu will hide to the background and goes back to the first Menu, Without any error. that`s what I want.
BUT,

Menu 3 Pic
After running Challenge Points Hack you get a pop-up with this menu here on the top. If I cancel it.


Menu 4 Pic
It goes back to The Crate hack menu Again, that is oky, and if I want to cancel this menu also, the script crash with this error here under.
Bug Log Pic



Script link: https://www.dropbox.com/s/kc9m9b2rlxwlny1/Armed Heist Edited for GG.lua?dl=0


Crash Log:


(Error)
Script beëindigd:
Script error: luaj.LuaError: @/storage/emulated/0/Download/lua/Armed Heist Edited for GG.lua:45
`if CRH[2] == true then crh2() end`
attempt to index ? (a nil value) with key '2'
level = 1, pc = 24
stack traceback:
/storage/emulated/0/Download/lua/Armed Heist Edited for GG.lua:45 in function 'CratesH'
/storage/emulated/0/Download/lua/Armed Heist Edited for GG.lua:28 in function 'SMENU'
/storage/emulated/0/Download/lua/Armed Heist Edited for GG.lua:21 in function 'HOME'
/storage/emulated/0/Download/lua/Armed Heist Edited for GG.lua:4 in function 'hello'
/storage/emulated/0/Download/lua/Armed Heist Edited for GG.lua:146 in main chunk
[Java]: in ?
at luaj.LuaValue.error(LuaValue.java:1075)
at luaj.LuaValue.indexerror(LuaValue.java:2923)
at luaj.LuaValue.gettable(LuaValue.java:2830)
at luaj.LuaValue.get(LuaValue.java:1178)
at luaj.LuaClosure.execute(LuaClosure.java:275)
at luaj.LuaClosure.call(LuaClosure.java:145)
at luaj.LuaValue.callNotNull(LuaValue.java:3233)
at luaj.LuaClosure.execute(LuaClosure.java:431)
at luaj.LuaClosure.call(LuaClosure.java:145)
at luaj.LuaValue.callNotNull(LuaValue.java:3233)
at luaj.LuaClosure.execute(LuaClosure.java:431)
at luaj.LuaClosure.call(LuaClosure.java:145)
at luaj.LuaValue.callNotNull(LuaValue.java:3233)
at luaj.LuaClosure.execute(LuaClosure.java:431)
at luaj.LuaClosure.call(LuaClosure.java:145)
at luaj.LuaValue.callNotNull(LuaValue.java:3233)
at luaj.LuaClosure.execute(LuaClosure.java:431)
at luaj.LuaClosure.call(LuaClosure.java:145)
at android.ext.Script.runScript(Script.java:5490)
at android.ext.Script$ScriptThread.run(Script.java:5291)

 

Share this post


Link to post
Share on other sites

variable CRH contain nil if dialog cancel. So add check for this and do appropriate action. For example:

if CRH == nil then os.exit() end

 

Share this post


Link to post
Share on other sites
Posted (edited)

Thx Enyby for the quick answer.
I tried out to flow your solution, but I didn't come out. I still getting errors in other menu's .

Idon't want to Exit the script, but i want to hide it when i press cancel.
can you please help me a little bit more. to find a way here out.

Can you please show me where to put that piece of code in my script if it's not a lot of trouble.
I appreciate your help a lot.
Thank you.

function hello()
gg.setVisible(false)
HH = gg.alert("/////////  WELCOME TO \n/////////  Armed Heist v. 1.1.17 \n///////// GG Hack Script 1.0 \n☡ Read The Explanation Otherwise It Will Not Work ☡", "OK","Explanation")
if HH == 1 then HOME() end
if HH == 2 then Explanation() end
end

function Explanation()
gg.alert([[
>>> Armed Heist: GG Script 1.0:
- To Hack Armed Heist  Follow This Tut Step By Step
- First Start The Game.
- Press MissionSupply In The Game To Test Out.
- Good Luck]])
end
gg.toast("Good Luck")

HOME = 1
function HOME()
HM = gg.choice({" Armed Heist Hack MENU"," EXIT"}, nil, "▰ ▱ Armed Heist Hack  ▰ ▱ \nArmed Heist Hack : 2.1.1  ▎SCRIPT v1.0\nMADE BY Tezter")
if HM == 1 then SMENU() end
if HM == 2 then EXIT() end
HOMEDM = -1 end

function SMENU()
SMEN = gg.choice({"Crates Hack Menu","Levels Hack Menu","Power Hack Menu","Weapons Hack Menu","↺ BACK"}, nil, " Armed Heist Hack MENU")

if SMEN == 1 then CratesH() end
if SMEN == 2 then levelH() end
if SMEN == 3 then PowerH() end
if SMEN == 4 then WeaponsH() end
if SMEN == 5 then HOME() end
end


function CratesH()
CRH = gg.multiChoice({
" Challenge Points Hack",
" Crate Choose Hack ", 
"☡ Read The Explanation ☡ ", "↺ BACK"}, nil, " Crates Hack Menu")


if CRH == nil then else
if CRH[1] == true then crh1() end
if CRH[2] == true then crh2() end
if CRH[3] == true then cpEX() end
if CRH[4] == true then SMENU() end


end 
end


function crh1()
gg.clearResults()
gg.processResume()
gg.toast("☡ Read The Explanation Otherwise It Will Not Work ☡ ")


v= gg.prompt({A='Add How Many Challenge Points You Have Instead Of The ? ',B= 'Add Here How Many Challenge Points You Want'},{A='"........F;..........F;.......F;.........F; ? D:125"',B='"Clean This Text And Add Here The New Value "'})

if v == nil then CratesH(
gg.alert ('Script Canceled, No input') ) else  


gg.searchNumber (v.A, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(25)
gg.editAll(v.B, gg.TYPE_DWORD)
gg.processResume()
gg.toast("Challenge Points Hack Is Successfull Activated")
end

end

-- ==================================

function crh2()
gg.clearResults()
gg.processResume()
gg.toast("☡ Read The Explanation Otherwise It Will Not Work ☡ ")

v= gg.prompt({C='Add Here The Number of The Crate from The List Instead Of The ?',D= 'Add Here The Number Of The  Crate You Want It To Change To ' }, {C='Own Crate NR;?;D; F; D:13',D=' D; F; D:13 '})

if v == nil then CratesH(
gg.toast("Script Canceled, No input") ) 

else
gg.searchNumber (v.C, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(25)
gg.editAll(v. D, gg.TYPE_DWORD)


gg.processResume()
gg.toast("Crates Hack Successful Activated")
end
end
-- =================================

function cpEX()
EE= gg.alert([[
: 
 Crate Choose Hack 

- Good Luck]],"OK")
if EE == 1 then CratesH() end
gg.toast("Good Luck")
end

-- ==============================



function EXIT() os.exit() end
hello() while true do
if gg.isVisible(true) then
HOMEDM = 1
gg.setVisible(false) end
if HOMEDM == 1 then
HOME() end
end

 

Edited by Tezter

Share this post


Link to post
Share on other sites

Do not know how to do it

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By soffter
      I am trying to transform my old menu to put multiChoice but I spent hours and I did not find a way, I do not understand what I am doing wrong, could someone help me how it would be please?
      This is the menu I am trying to modify:
      ::zedgmerlol31::
      gg.clearResults()
      menu=gg.choice({"👉Ejecutar Primero👈","🔍Kate la exploradora🔎","🐖Hugh el granjero🐖","🏃Bill el matón🏃","⏪Atrás⏪"},nil,"Zedgmerlol")
      if menu == 1 then goto zedgmerlol1 end
      if menu == 2 then goto zedgmerlolk1 end
      if menu == 3 then goto zedgmerlolk2 end
      if menu == 4 then goto zedgmerlolk3 end
      if menu == 5 then goto Mainmenu end
      gg.toast("Zedgmerlol")
      print (" Last Day On Earth ")
      print ("By Zedgmerlol")
      os.exit()
          
      ::zedgmerlolk1::
      gg.searchNumber('27;6553708;6619247;7143519;7471205;6619235;6357102;7929970;7340127;6488161;6226027;6225969;6225971;3407922;104:57', 
      gg.TYPE_DWORD ) 
      gg.searchNumber('27', 
      gg.TYPE_DWORD ) 
      gg.getResults(4) goto zedgmer99
      if Mainmenu == nil then goto Mainmenu end
      os.exit()        
       
      ::zedgmerlolk2::   
      gg.searchNumber('27;6553708;6619247;7143519;7471205;6619235;6357102;7929970;7340127;6488161;6226027;6225968;6225971;3407922;104:57', 
      gg.TYPE_DWORD ) 
      gg.searchNumber('27', 
      gg.TYPE_DWORD ) 
      gg.getResults(4) goto zedgmer99
      if Mainmenu == nil then goto Mainmenu end
      os.exit()
      ::zedgmerlolk3::
      gg.searchNumber('27;6553708;6619247;7143519;7471205;6619235;6357102;7929970;7340127;6488161;6226027;6225970;6225971;3407922;104:57', 
      gg.TYPE_DWORD ) 
      gg.searchNumber('27', 
      gg.TYPE_DWORD ) 
      gg.getResults(4) goto zedgmer99
      if Mainmenu == nil then goto Mainmenu end
      os.exit()
    • By What_The_Buns
      So, I've been playing Dragalia Lost for the past three weeks now and I kind of want to hack/cheat the game but i haven't tried it yet because i don't want to get ban (if its possible to get ban). Does anyone know how to hack/cheat or make a script for Dragalia Lost? I would really appreciate it. 
      Link: https://play.google.com/store/apps/details?id=com.nintendo.zaga
      Thank you in advance. 
       
    • By eldragonhacker
      Hello, I would like to ask the geniuses of this forum for a shooting script always at the head of World War Heroes 2
      tanks 

    • By Gamer_Hacker
      I make this hack for people love to play rule of survival all hack are safe but be carefull of using it some player may report you Please dont forget to Subscribe and more hack will come to my Next video 
      Fly hack is Risky 
      What new:
      See through wall fix
      Walk through wall Selection 
      Body color= Active this in island or in plane but don't jump wait it finish the loading of hack

      In my new update you can easily win by Combining 
      the  body color, Walk throuhgh, See through walls you can see enemy hiding in house 
      Root Require to work this Script

      Dont Forget to Subcribe
      Like
      Share
    • By Gamer_Hacker
      View File Rule Of Survival Script v1.5
      I make this hack for people love to play rule of survival all hack are safe but be carefull of using it some player may report you Please dont forget to Subscribe and more hack will come to my Next video 
      Fly hack is Risky 
      What new:
      See through wall fix
      Walk through wall Selection 
      Body color= Active this in island or in plane but don't jump wait it finish the loading of hack

      In my new update you can easily win by Combining 
      the  body color, Walk throuhgh, See through walls you can see enemy hiding in house 
      Root Require to work this Script

      Dont Forget to Subcribe
      Like
      Share
      Submitter Gamer_Hacker Submitted 04/16/18 Category LUA scripts  
×
×
  • Create New...