Cornysz Posted October 27, 2018 Share Posted October 27, 2018 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 Link to comment Share on other sites More sharing options...
Revoxtical Posted October 27, 2018 Share Posted October 27, 2018 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') Link to comment Share on other sites More sharing options...
Cornysz Posted October 27, 2018 Author Share Posted October 27, 2018 place function in first then call in lastfunction 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 :/ Link to comment Share on other sites More sharing options...
Revoxtical Posted October 27, 2018 Share Posted October 27, 2018 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() Link to comment Share on other sites More sharing options...
Cornysz Posted October 27, 2018 Author Share Posted October 27, 2018 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 :/ Link to comment Share on other sites More sharing options...
Administrators Enyby Posted October 28, 2018 Administrators Share Posted October 28, 2018 You must define function before call it. Before. Not after. So code of function must be above it calls. Link to comment Share on other sites More sharing options...
Cornysz Posted October 28, 2018 Author Share Posted October 28, 2018 You must define function before call it. Before. Not after. So code of function must be above it calls.Yeh already, same error Link to comment Share on other sites More sharing options...
Administrators Enyby Posted October 28, 2018 Administrators Share Posted October 28, 2018 You must show exact full code and full text of error or no help. Link to comment Share on other sites More sharing options...
Cornysz Posted October 28, 2018 Author Share Posted October 28, 2018 function searchauto(search)gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)end::pkat::dogg.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 smthendi only copy the code related to searchauto function Link to comment Share on other sites More sharing options...
Cornysz Posted October 28, 2018 Author Share Posted October 28, 2018 You must show exact full code and full text of error or no help.if u need the script.lua pm meh Link to comment Share on other sites More sharing options...
Revoxtical Posted October 28, 2018 Share Posted October 28, 2018 (edited) 1 hour ago, Cornysz said: function searchauto(search)gg.searchNumber(search, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1) end ::pkat:: dogg.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 October 28, 2018 by Revoxtical Link to comment Share on other sites More sharing options...
Cornysz Posted October 28, 2018 Author Share Posted October 28, 2018 ::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 :/ Link to comment Share on other sites More sharing options...
Administrators Enyby Posted October 28, 2018 Administrators Share Posted October 28, 2018 Look like you not need help. 1 Link to comment Share on other sites More sharing options...
Cornysz Posted October 28, 2018 Author Share Posted October 28, 2018 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 :/ Link to comment Share on other sites More sharing options...
Administrators Enyby Posted October 28, 2018 Administrators Share Posted October 28, 2018 Something does not look like. Instead of clearly doing what you are asked to do, you do what you want. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now