I have created a code that search and edits values depending on user inputs, but when it comes in executing it gg says that the search value is nil, even though inputs are not empty.
Error:
gg.searchNumber(nBV[num2], gg.TYPE_DWORD)
bad argument #1: nil: string expected, got nil (field 'searchNumber')
local nBV = {
[1248889551] = 2000,
[1248889552] = 4000,
[1248889553] = 6000,
[1248889554] = 8000,
[1248889555] = 10000 }
local PromptN = gg.prompt({[2] = 'Type Gold Storage Capacity Right Now', [1] = 'Type Ideal Gold Storage Capacity [ 2000 ~ 10000 ]'}, {[2] = 2000, [1] = 10000}, {[2] = 'number', [1] = 'number'})
if PromptN[1] == nil or PromptN[1] == '' or PromptN[2] == nil or PromptN[2] == '' then
gg.toast('Canceling, Please Type Values!')
else
local num1 = PromptN[1]
local num2 = PromptN[2]
gg.clearResults()
gg.clearList()
gg.searchNumber(nBV[num2], gg.TYPE_DWORD)
gg.getResults(gg.getResultsCount())
gg.editAll(nBV[num1], gg.TYPE_DWORD)
gg.clearList()
gg.clearResults()
end
Any help would be appreciated!