Jump to content
  • 0

Why when I put 25 they still search with 1


FangYX

Question

Posted

V = gg.prompt({"Input Value"},nil,{"number"}) 
gg.clearResults()
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber('V[1]', gg.TYPE_DWORD)
resultsCount = gg.getResultCount()
  results = gg.getResults(resultsCount)
    for x = 1, resultsCount do    
      gg.addListItems({
        [1] = {
          address = results[x].address + 20,
          flags = 4,
          freeze = true,
          value = 10
        }
      })
      gg.addListItems({
        [1] = {
          address = results[x].address + 20,
          flags = 4,
          freeze = false,
          value = 10
        }
      })
     end

[added 1 minute later]
Just now, Fathoni267 said:

V = gg.prompt({"Input Value"},nil,{"number"}) 
gg.clearResults()
gg.setRanges(gg.REGION_ANONYMOUS)
gg.searchNumber('V[1]', gg.TYPE_DWORD)
resultsCount = gg.getResultCount()
  results = gg.getResults(resultsCount)
    for x = 1, resultsCount do    
      gg.addListItems({
        [1] = {
          address = results[x].address + 20,
          flags = 4,
          freeze = true,
          value = 10
        }
      })
      gg.addListItems({
        [1] = {
          address = results[x].address + 20,
          flags = 4,
          freeze = false,
          value = 10
        }
      })
     end

sorry for my bad english😔

4 answers to this question

Recommended Posts

Posted
31 minutes ago, Fathoni267 said:

V = gg.prompt({"Input Value"},nil,{"number"}) 

I dont know lua well but use below for more safe. 

V = gg.prompt({"Input Value","123"}) -- you dont need to prove number. It will auto translate to string for gg.

 

35 minutes ago, Fathoni267 said:

gg.searchNumber('V[1]', gg.TYPE_DWORD)

Dont use as string cuz V is a variable. Use

gg.searchNumber(V[1], gg.TYPE_DWORD)

Done!

Posted
18 minutes ago, Lover1500 said:

I dont know lua well but use below for more safe. 


V = gg.prompt({"Input Value","123"}) -- you dont need to prove number. It will auto translate to string for gg.

 

Dont use as string cuz V is a variable. Use


gg.searchNumber(V[1], gg.TYPE_DWORD)

Done!

but if the value is

gg.searchNumber("10;V[1]", gg.TYPE_DWORD)

how to write it?

Posted

If you want to fuse with values and variable for gg script. You can use dot dot(".."). 

For example,

"10;". .V[1]

V[1]. .";10"

V[1]

"10;". .V[1]. .";10"

So

1 hour ago, Fathoni267 said:

gg.searchNumber("10;V[1]", gg.TYPE_DWORD)

It will be..... 

second_V = "10;"..V[1]
gg.searchNumber(second_V, 4) --4 is gg.TYPE_DWORD

Or you can use directly without second variable

gg.searchNumber("10;". .V[1], gg.TYPE_DWORD)

 

They are the same. 

Posted
41 minutes ago, Lover1500 said:

If you want to fuse with values and variable for gg script. You can use dot dot(".."). 

For example,

"10;". .V[1]

V[1]. .";10"

V[1]

"10;". .V[1]. .";10"

So

It will be..... 


second_V = "10;"..V[1]
gg.searchNumber(second_V, 4) --4 is gg.TYPE_DWORD

Or you can use directly without second variable

gg.searchNumber("10;". .V[1], gg.TYPE_DWORD)

 

They are the same. 

thanks bro:-)

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.