Jump to content
I-Do-Trolling

Help with seek bar

Recommended Posts

Posted (edited)

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

Edited by I-Do-Trolling
Added download script for help

Share this post


Link to post
Share on other sites

11 minutes ago, I-Do-Trolling said:

gg.editAll('n[1]', gg.TYPE_FLOAT)

Wrong, must be

gg.editAll(n[1], gg.TYPE_FLOAT)

Because that's not string

Share this post


Link to post
Share on other sites

@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)

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites
41 minutes ago, I-Do-Trolling said:

gg.editAll('n[1]', gg.TYPE_FLOAT)

The number is on "n[2]"

I was fix you script

Seek bar script.lua

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

×
×
  • Create New...