Jump to content
  • 0

Questions about search between functions


hodor592

Question

I need to do something in the game after calling the first function, then call the second one.

I wish the second function refine the result of first function's search, not a new search.

But now the script performs a new one. 

My code:

function energy()
   gg.clearResults()
   gg.setRanges(gg.REGION_ANONYMOUS)
   gg.searchNumber("0;-0.1~0;10~60;0::13", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
   gg.searchNumber("0;-0.1~0::5", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
   cd = gg.getResults(3000)
   gg.addListItems(cd)
   gg.setVisible(true)

end




function gold()
  x = getListItems()
  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)
  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)
  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)


  local t = gg.getResults(20)
  for i, v in ipairs(t) do
	t[i].value = '0'
	t[i].freeze = true
  end
  gg.setVisible(true)


end

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • Administrators
  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)
  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)
  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)

This code simple clear search results, if your values not changed thousand (or more) times per second.

Link to comment
Share on other sites

10 minutes ago, Enyby said:

  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)
  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)
  gg.searchFuzzy('0', gg.SIGN_FUZZY_NOT_EQUAL)

This code simple clear search results, if your values not changed thousand (or more) times per second.

Thanks for answering!

But after this code I got about 100,000 results.

And how to make it refine the first function?

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.