Jump to content

Recommended Posts

Posted

So i put function code liek this in upper line

 

function searchauto(search)

gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)

end

 

and then i use the function (this is just for example)

::code::

searchauto('183W;183W;125F')

blabla

 

after i execute my script i got an error attempt to call nil, i don't understand. How to fix this? Ty in advance

Posted

place function in first then call in last

function searchauto(search)
 gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
end

searchauto('183W;183W;125F')

 

Posted
place function in first then call in last
function searchauto(search)gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)endsearchauto('183W;183W;125F')

 

already bro. i place the function in upper line and i call in below it.
but still error :/
Posted

Place first run or call first run in last script
 

function code()
 searchauto('183W;183W;125F')
end

-- i want this is run first
function menu()
  blablabla....
  code()
end

function searchauto(search)
 gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
end

--place first run or call first run in last script
menu()

 

Posted
Place first run or call first run in last script
 
function code()searchauto('183W;183W;125F')end-- i want this is run firstfunction menu() blablabla.... code()endfunction searchauto(search)gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)end--place first run or call first run in last scriptmenu()

 

"Place first run or call first run in last script" what do u mean? im not understand hehe srry :/
  • Administrators
Posted

You must define function before call it. Before. Not after. So code of function must be above it calls.

Posted
You must define function before call it. Before. Not after. So code of function must be above it calls.
Yeh already, same error
Posted

function searchauto(search)
gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
end

::pkat::
do
gg.toast('Please wait. Loading!')
searchauto('98W;98W;125F')
local a=gg.getResults(4)
freeze(a,'5480',2)
freeze(a,'5480',3)
freeze(a,'5480',4)
aa = gg.alert('blabla','OK')
goto smth
end

i only copy the code related to searchauto function

Posted
You must show exact full code and full text of error or no help.

if u need the script.lua pm meh

 

Posted (edited)
1 hour ago, Cornysz said:

function searchauto(search)
gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)
end

::pkat::
do
gg.toast('Please wait. Loading!')
searchauto('98W;98W;125F')
local a=gg.getResults(4)
freeze(a,'5480',2)
freeze(a,'5480',3)
freeze(a,'5480',4)
aa = gg.alert('blabla','OK')
goto smth
end

i only copy the code related to searchauto function

::pkat::
do
gg.toast('Please wait. Loading!')
searchauto('98W;98W;125F')
local a=gg.getResults(4)
if gg.getResultCount() > 0 then
  freeze(a,'5480',2)
  freeze(a,'5480',3)
  freeze(a,'5480',4)
  aa = gg.alert('blabla','OK')
end
goto smth
end

Add gg.getResultCount()

Edited by Revoxtical
Posted
::pkat::dogg.toast('Please wait. Loading!')searchauto('98W;98W;125F')local a=gg.getResults(4)if gg.getResultCount() > 0 then freeze(a,'5480',2) freeze(a,'5480',3) freeze(a,'5480',4) aa = gg.alert('blabla','OK')endgoto smthend

Add gg.getResultCount()

i need to fix the searchnumber :/
Posted
Look like you not need help.
waduhek, i need it right now about searchnumber function. Want to ask in stackoverflow but smth error so i ask here :/
  • Administrators
Posted

Something does not look like. Instead of clearly doing what you are asked to do, you do what you want.

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
×
×
  • 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.