Jump to content
  • 0

Please help me


BaldiGT

Question

Please Help me

I want to chose 1 and 3, but it just Execute number 1...please help me how to  fix it...

testing.lua

gg.clearResults()

g = gg.multiChoice({'1','2','3'},nil,'Chose Your TYPE')

if g[1] then gg.searchNumber('1',gg.TYPE_WORD) gg.getResults(9) 
gg.editAll('1',gg.TYPE_DWORD)
end

if g[2] then gg.searchNumber('2', 
gg.TYPE_WORD)
gg.getResults(8)
gg.editAll('488', gg.TYPE_WORD)
end

if g[3] then gg.searchNumber('3',gg.TYPE_FLOAT)
end

if g == nil then os.exit() end

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • Administrators

Wrong nil check order - this check should be first.
Incorrect access to indices is either strings or numbers.
There are no cleaning results for each option, which causes searches to become dependent.

Instead of looking for something, try to make prints in each block, see which blocks are executed and where.

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.