CmP Posted November 3, 2018 Posted November 3, 2018 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.
maulz Posted November 3, 2018 Posted November 3, 2018 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.