Jump to content
Sign in to follow this  
NewbieSquadArk

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...