Jump to content
  • 0

"attempt to index ? (a nil value)"


TheSwindler

Question

Posted

I'm new here, I have this problem that make me insane XD (idk how to fix this problem

Here's the log

Script ended:
Script error: luaj.o: /storage/sdcard/VMOSfiletransferstation/TheSwindler.lua:31
`        if ts [4] == true then MAINMENU () end  `
attempt to index ? (a nil value) with key '4' (global 'ts')
level = 1, const = 16, proto = 8, upval = 1, vars = 2, code = 40
GETTABLE v0 v0 4
 ; PC 5 CODE 0040C007 OP 7 A 0 B 0 C 259 Bx 259 sBx -130812
stack traceback:
    /storage/sdcard/VMOSfiletransferstation/TheSwindler.lua:31 in main chunk
    [Java]: in ?
    at luaj.LuaValue.f(src:989)
    at luaj.LuaValue.c(src:2864)
    at luaj.LuaValue.i(src:2767)
    at luaj.LuaValue.w(src:1094)
    at luaj.LuaClosure.a(src:363)
    at luaj.LuaClosure.l(src:160)
    at android.ext.Script.d(src:6056)
    at android.ext.Script$ScriptThread.run(src:5785)

IMG_20210310_062613.jpg

3 answers to this question

Recommended Posts

Posted

this an example script that i kept a long time ago..maybe it you can use it as guidance in the future.

local gg = gg
--you put <gg.setRanges> if all the hacks are from the same region.

function main()
local menu = gg.choice({
      "\n>> Hack Menu",
      "\n<< EXIT"},
nil,"Main Menu")

if menu == nil then gg.toast("minimize menu")
elseif
menu == 1 then hackmenu()
elseif
menu == 2 then gg.toast("Canceled")
os.exit()
end
end


function hackmenu()
local menu  = gg.multiChoice({
     "Hack 1",
     "Hack 2",
     "Hack 3",
     "Hack 4",
     "Hack 5",
     "BACK"},
nil,"Hack Menu")


--cancel
if menu == nil then 
gg.setVisible(false)
gg.toast("Minimize menu") 
else

--hack 1
if menu[1] == true then
--put your hack here
gg.alert("Hack 1 Done")
end

--hack 2
if menu[2] == true then
--put your hack here
gg.alert("Hack 2 Done")
end

--hack 3
if menu[3] == true then
--put your hack here
gg.alert("Hack 3 Done")
end

--hack 4
if menu[4] == true then
--put your hack here
gg.alert("Hack 4 Done")
end

--hack 5
if menu[5] == true then
--put your hack here
gg.alert("Hack 5 Done")
end

--BACK
if menu[6] == true then
gg.toast("return to main")
main()
end
end
end

while true do 
if gg.isVisible() then
gg.setVisible(false)
main()
end
end

 

Posted
On 3/10/2021 at 7:38 PM, MonkeySAN said:

this an example script that i kept a long time ago..maybe it you can use it as guidance in the future.


local gg = gg
--you put <gg.setRanges> if all the hacks are from the same region.

function main()
local menu = gg.choice({
      "\n>> Hack Menu",
      "\n<< EXIT"},
nil,"Main Menu")

if menu == nil then gg.toast("minimize menu")
elseif
menu == 1 then hackmenu()
elseif
menu == 2 then gg.toast("Canceled")
os.exit()
end
end


function hackmenu()
local menu  = gg.multiChoice({
     "Hack 1",
     "Hack 2",
     "Hack 3",
     "Hack 4",
     "Hack 5",
     "BACK"},
nil,"Hack Menu")


--cancel
if menu == nil then 
gg.setVisible(false)
gg.toast("Minimize menu") 
else

--hack 1
if menu[1] == true then
--put your hack here
gg.alert("Hack 1 Done")
end

--hack 2
if menu[2] == true then
--put your hack here
gg.alert("Hack 2 Done")
end

--hack 3
if menu[3] == true then
--put your hack here
gg.alert("Hack 3 Done")
end

--hack 4
if menu[4] == true then
--put your hack here
gg.alert("Hack 4 Done")
end

--hack 5
if menu[5] == true then
--put your hack here
gg.alert("Hack 5 Done")
end

--BACK
if menu[6] == true then
gg.toast("return to main")
main()
end
end
end

while true do 
if gg.isVisible() then
gg.setVisible(false)
main()
end
end

 

Thank you for helping me 😄

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.