Jump to content
  • 0

Help with seek bar


I-Do-Trolling

Question

I did try to make one but when i change the value it just changes to 1 everytime

Plz i need help 

 

if gg.isVisible(true) 
then gg.setVisible(false)
end
gg.clearResults()
Random=1
function SM()

local n = gg.prompt({'Fov','Field of fiew:[150; 360]','exit'}, {false,360, false}, {'checkbox','number','checkbox'})
if n == nil then gg.sleep(1)
else
if n[1] and n[2] then fov() end
if n[3] then exit() end


end
Random=-1
end

function fov()
gg.setRanges(gg.REGION_CODE_APP)
gg.searchNumber("150~360", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
gg.searchAddress("944", -1, gg.TYPE_FLOAT, gg.SIGN_EQUAL, 0, -1)
gg.getResults(10)
gg.editAll('n[1]', gg.TYPE_FLOAT)
gg.toast('Fov changed')
end

function exit()
print('script by i-do-trolling')
gg.toast('script exit')
os.exit()
end


while(true)
do
  if gg.isVisible(true) then
    Random=1
    gg.setVisible(false) 
  end 
  gg.clearResults()
  if Random==1 then   SM() end
end

 

Seek bar script.lua

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

@maulz 

I did try that but i just give me error

 

Script ended:
Script error: luaj.LuaError: @/storage/emulated/0/notes/Seek bar script.lua:26
`gg.editAll(n[1], gg.TYPE_FLOAT)`
attempt to index ? (a nil value) with key '1'
level = 1, pc = 35
stack traceback:
    /storage/emulated/0/notes/Seek bar script.lua:26 in function 'fov'
    /storage/emulated/0/notes/Seek bar script.lua:11 in function 'SM'
    /storage/emulated/0/notes/Seek bar script.lua:44 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 android.ext.Script.runScript(Script.java:5403)
    at android.ext.Script$ScriptThread.run(Script.java:5204)

Link to comment
Share on other sites

1 minute ago, I-Do-Trolling said:

@maulz 

I did try that but i just give me error

 

Script ended:
Script error: luaj.LuaError: @/storage/emulated/0/notes/Seek bar script.lua:26
`gg.editAll(n[1], gg.TYPE_FLOAT)`
attempt to index ? (a nil value) with key '1'
level = 1, pc = 35
stack traceback:
    /storage/emulated/0/notes/Seek bar script.lua:26 in function 'fov'
    /storage/emulated/0/notes/Seek bar script.lua:11 in function 'SM'
    /storage/emulated/0/notes/Seek bar script.lua:44 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 android.ext.Script.runScript(Script.java:5403)
    at android.ext.Script$ScriptThread.run(Script.java:5204)

The script cannot load "n[1]" because "n" is local.

22 minutes ago, I-Do-Trolling said:

local n = gg.prompt({'Fov','Field of fiew:[150; 360]','exit'}, {false,360, false}, {'checkbox','number','checkbox'})

Solution : remove "local"

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.