stpacybits Posted February 6, 2020 Share Posted February 6, 2020 I have a problem: I want to make a script for searching text for a game but i dont know how i must do that in my script! This is what i have: gg.alert('script created by stpacybits on yt') gg.toast('please wait') menu=gg.choice({'start packs hack','exit'}) if menu==1 then gg.searchText(":FUTURE STARS",gg.TYPE_TEXT_UTF-16) gg.getResults(100) gg.clearResults() end if menu==2 then os.exit() end And this is what i got if i execute the script: Script ended: Script error: luaj.LuaError: /storage/emulated/0/Download/unlimited lr.lua:6 `gg.searchText(":FUTURE STARS",gg.TYPE_TEXT_UTF-16)` attempt to perform arithmetic __sub on a nil value and a number value (field 'TYPE_TEXT_UTF') level = 1, const = 20, proto = 0, upval = 1, vars = 4, code = 40 SUB v2 v2 16 ; PC 24 CODE 0143408E OP 14 A 2 B 2 C 269 Bx 1293 sBx -129778 stack traceback: /storage/emulated/0/Download/unlimited lr.lua:6 in main chunk [Java]: in ? at luaj.LuaValue.error(LuaValue.java:989) at luaj.LuaValue.arithmt(LuaValue.java:2243) at luaj.LuaValue.sub(LuaValue.java:2137) at luaj.LuaClosure.execute(LuaClosure.java:400) at luaj.LuaClosure.call(LuaClosure.java:160) at android.ext.Script.runScript(Script.java:5736) at android.ext.Script$ScriptThread.run(Script.java:5474) Pls anyone help, what must i do? Link to comment Share on other sites More sharing options...
Administrators Enyby Posted February 6, 2020 Administrators Share Posted February 6, 2020 Read API help. Carefully. Read all examples on it. Or use record feature of gg and investigate results. Link to comment Share on other sites More sharing options...
Question
stpacybits
I have a problem:
I want to make a script for searching text for a game but i dont know how i must do that in my script!
This is what i have:
gg.alert('script created by stpacybits on yt')
gg.toast('please wait')
menu=gg.choice({'start packs hack','exit'})
if menu==1 then
gg.searchText(":FUTURE STARS",gg.TYPE_TEXT_UTF-16)
gg.getResults(100)
gg.clearResults()
end
if menu==2 then
os.exit()
end
And this is what i got if i execute the script:
Script ended:
Script error: luaj.LuaError: /storage/emulated/0/Download/unlimited lr.lua:6
`gg.searchText(":FUTURE STARS",gg.TYPE_TEXT_UTF-16)`
attempt to perform arithmetic __sub on a nil value and a number value (field 'TYPE_TEXT_UTF')
level = 1, const = 20, proto = 0, upval = 1, vars = 4, code = 40
SUB v2 v2 16
; PC 24 CODE 0143408E OP 14 A 2 B 2 C 269 Bx 1293 sBx -129778
stack traceback:
/storage/emulated/0/Download/unlimited lr.lua:6 in main chunk
[Java]: in ?
at luaj.LuaValue.error(LuaValue.java:989)
at luaj.LuaValue.arithmt(LuaValue.java:2243)
at luaj.LuaValue.sub(LuaValue.java:2137)
at luaj.LuaClosure.execute(LuaClosure.java:400)
at luaj.LuaClosure.call(LuaClosure.java:160)
at android.ext.Script.runScript(Script.java:5736)
at android.ext.Script$ScriptThread.run(Script.java:5474)
Pls anyone help, what must i do?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.