Jump to content
  • 0

Help for gg.prompt searching


juyox

Question

x= gg.prompt({[2]='Enter Value'}, {[1]='1;3;2;', [2]='22', [3]=',000~', [4]=',999;0::45'})
gg.searchNumber(x[1]x[2]x[3]x[2]x[4], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
found = gg.getResultCount()
gg.alert('We found: '..found)

Hi guys, please help for make it.

Where is my fault?

Final patten for search is:
1;3;2;22,000~22,999;0::70

In every search i just want to change two fisrt number of 22,000~22,999.

in gg.promp line i just wrote [2]= 'Enter Value' b'cuz it's  variable.

I got this error:

Script ended:
Script error: org.luaj.vm2.LuaError: @/sdcard/Notes/tttttt.lua:2
`gg.searchNumber(x[2],x[1], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)`
bad argument #3 (number): boolean expected, got number

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

val = gg.prompt({'input value'},nil,{'number'})
gg.searchNumber('1;3;2;22,000~22,999;0::70', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.searchNumber('22,000~22,999', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(2)
gg.editAll(val[1], gg.TYPE_DWORD)

I cant understand your explanation clearly. But,  you can try code above. 

 

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.