Jump to content

tell how to multi search with gg.promt?


Recommended Posts

22 hours ago, maulz said:

Maybe can help

group search.lua

Your example is mostly fine, but there are two things that you should pay attention to.

This is incorrect usage of "prompt" function:

g = gg.prompt({"Value 1", "Value 2", "Value 3"}, {[1] = number, [2] = number, [3] = number})

And here is correct usage:

g = gg.prompt({'Value 1', 'Value 2', 'Value 3'}, nil, {[1] = 'number', [2] = 'number', [3] = 'number'})

Also second argument of the call to "toast" function should be "true", not "True", because "True" is treated as global variable and uninitialized global variables are evaluated to nil.
So if you write "True", in this case it is equal to:

gg.toast('Success!', nil)

Don't forget to check GG help and Lua reference manual when in doubt.

Link to comment
Share on other sites

1 hour ago, CmP said:

Your example is mostly fine, but there are two things that you should pay attention to.

This is incorrect usage of "prompt" function:


g = gg.prompt({"Value 1", "Value 2", "Value 3"}, {[1] = number, [2] = number, [3] = number})

And here is correct usage:


g = gg.prompt({'Value 1', 'Value 2', 'Value 3'}, nil, {[1] = 'number', [2] = 'number', [3] = 'number'})

Also second argument of the call to "toast" function should be "true", not "True", because "True" is treated as global variable and uninitialized global variables are evaluated to nil.
So if you write "True", in this case it is equal to:


gg.toast('Success!', nil)

Don't forget to check GG help and Lua reference manual when in doubt.

Thanks for the correct sir

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.