Jump to content
  • 0

Search in between in lua script


SAGEPAPI

Question

Posted

I want to search in between two values in a lua script with a prompt. something like this:

M= gg.prompt({i= 'input cash'},{i='Cash here'}) 

But with 2 values.

3 answers to this question

Recommended Posts

Posted
if A == 4 then
local p = gg.prompt({'input exp low value','input exp high value'},{nil,nil},{'number','number'})
gg.searchNumber(p[1]~p[2],gg.TYPE_DOUBLE)
end

When i type the 2 values in. The only thing it searches is 1. 

Posted

you have to concatenate variables (p) and string (~) so you have to use double dots (..) to do this. So ur search will be:

gg.searchNumber( p[1].."~"..p[2], gg.TYPE_DOUBLE )

 

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.