Jump to content
  • 0

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


Tezter

Question

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)

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.