Jump to content
  • 0

gg.prompt error


xX_Hobo_Xx

Question

当我使用gg .prompt 编写脚本时,我发现了空白处时脚本会因为而崩溃。我该如何解决?

 

 gg .prompt({"text"},{[1]="text"},{[1]="number"})[1]

 

function USELESS()
  HB = gg.choice({
  "放置斜坡方块(难用)",
  "地图所有车飞天(主端)",
  "人裂开(多人,易晕)",
  "视角转360°(易晕)",
  "载具轮胎大拐弯",
 }, nil, "选个功能吧")
 if HB == 1 then
  if xp == nil then 
  gg.clearResults()
  gg.setRanges(gg.REGION_ANONYMOUS) 
  gg.searchNumber("4,806,466,702,311,161,856Q;90F;0Q;0F;0Q;0F::25",gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0, -1)
  gg.refineNumber("0",gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0,-1)
  gg.getResults(1000)
  else
  gg.clearResults()
  gg.setRanges(gg.REGION_ANONYMOUS) 
  gg.searchNumber("4,806,466,702,311,161,856Q;90F;0Q;"..xp..";0Q;"..xp.."::25",gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0, -1)
  gg.refineNumber(xp,gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0,-1)
  gg.getResults(1000)
  end
  xp = gg.prompt({"原数值已经准备就绪了,等待输入修改数值\nTip:x改成前后方向的倾斜角度,y改成左右方向的倾斜角度,不得留空,不然会出问题,留空也得 x;0 或者 0;y。"},{[1]="x;y"--[[编辑框文字]]},{[1]="number"})[1]
  if xp == nil then goto e end
  gg.editAll(xp,gg.TYPE_FLOAT)
  gg.toast("开启")
::e::
end

 

错误:

 

 

脚本已结束::

当前脚本或许仅适用于最新版GameGuardian。请更新到最新版。

 

Script error: luaj.LuaError: @/storage/emulated/0/AR/Minebox.lua:71

` xp = gg.prompt({"原数值已经准备就绪了,等待输入修改数值\nTip:x改成前后方向的倾斜角度,y改成左右方向的倾斜角度,不得留空,不然会出问题,留空也得 x;0 或者 0;y。"},{[1]="x;y"--[[编辑框文字]]},...`

attempt to index ? (a nil value) with key '1'

level = 1, pc = 104

stack traceback:

 /storage/emulated/0/AR/Minebox.lua:71 in function 'USELESS'

 /storage/emulated/0/AR/Minebox.lua:15 in function 'Main'

 /storage/emulated/0/AR/Minebox.lua:419 in main chunk

 [Java]: in ?

 at luaj.LuaValue.error(LuaValue.java:986)

 at luaj.LuaValue.indexerror(LuaValue.java:2807)

 at luaj.LuaValue.gettable(LuaValue.java:2714)

 at luaj.LuaValue.get(LuaValue.java:1089)

 at luaj.LuaClosure.execute(LuaClosure.java:296)

 at luaj.LuaClosure.call(LuaClosure.java:145)

 at luaj.LuaValue.callNotNull(LuaValue.java:3117)

 at luaj.LuaClosure.execute(LuaClosure.java:456)

 at luaj.LuaClosure.call(LuaClosure.java:145)

 at luaj.LuaValue.callNotNull(LuaValue.java:3117)

 at luaj.LuaClosure.execute(LuaClosure.java:456)

 at luaj.LuaClosure.call(LuaClosure.java:145)

 at android.ext.Script.runScript(Script.java:5600)

 at android.ext.Script$ScriptThread.run(Script.java:5370)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

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.