Jump to content

Archived

This topic is now archived and is closed to further replies.

LeWLGr

Attempt to index a (nil value) problem

Recommended Posts

Hello im having problem with my script i dont know how to fix it already done bunch of codes fixing it 

and i tried to compile it with the compliler of the admin...

Script ended:
Script error: org.luaj.vm2.LuaError: @/storage/3636-3366/cheats/ros/my own cheats/compiler.lua:24
`            file:write(string.dump(test, sel == 2))`
attempt to index ? (a nil value)
stack traceback:
    /storage/3636-3366/cheats/ros/my own cheats/compiler.lua:24: in main chunk
    [Java]: in ?
    at org.luaj.vm2.LuaValue.error(LuaValue.java:1067)
    at org.luaj.vm2.LuaValue.indexerror(LuaValue.java:2910)
    at org.luaj.vm2.LuaValue.gettable(LuaValue.java:2818)
    at org.luaj.vm2.LuaValue.get(LuaValue.java:1170)
    at org.luaj.vm2.LuaClosure.execute(LuaClosure.java:270)
    at org.luaj.vm2.LuaClosure.call(LuaClosure.java:137)
    at android.ext.Script.runScript(Script.java:3635)
    at android.ext.Script$ScriptThread.run(Script.java:3556)

 

 

So here's the line 24 the code saying

local t = gg.multiChoice({'Car, footsteps can see on radar even though theyre far','less gravity','Walk Through Walls','purple body and gun','Antena Male Female UP','Invisible walls and floor','No slippery mountain','No Grass','Low Recoil','Help i got ban','EXIT'}, nil, "choose anything you want")

 

if t == nil then

gg.alert('Canceled')

sdone()

 

That is the line for 22-24 and if i change the sdone() into else (cause i just copied this code)

local t = gg.multiChoice({'A', 'B', 'C', 'D'})

if t == nil then

    gg.alert('Canceled')

else

    if t[1] then

        gg.alert('do A')

    end

here's the problem

Script ended:

Script error: org.luaj.vm2.LuaError: @/storage/3636-3366/cheats/ros/my own cheats/compiler.lua:24

` file:write(string.dump(test, sel == 2))`

attempt to index ? (a nil value)

stack traceback:

 /storage/3636-3366/cheats/ros/my own cheats/compiler.lua:24: in main chunk

 [Java]: in ?

 at org.luaj.vm2.LuaValue.error(LuaValue.java:1067)

 at org.luaj.vm2.LuaValue.indexerror(LuaValue.java:2910)

 at org.luaj.vm2.LuaValue.gettable(LuaValue.java:2818)

 at org.luaj.vm2.LuaValue.get(LuaValue.java:1170)

 at org.luaj.vm2.LuaClosure.execute(LuaClosure.java:270)

 at org.luaj.vm2.LuaClosure.call(LuaClosure.java:137)

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

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

 

How to fix this?

Share this post


Link to post
Share on other sites

24 line is not in your script, but in the compiler script. The reasons can be two. First, you are using not latest version of GG. The second is that you are trying to compile a non-working script. Before you compile it, you should check its functionality completely, and do not attempt to compile the script with errors.

Share this post


Link to post
Share on other sites

Or you are trying to load a script that is in a folder in which you can not create a file due to lack of rights for GG.

Share this post


Link to post
Share on other sites

Try compiler v2.1. I add check for path.

Share this post


Link to post
Share on other sites

×
×
  • Create New...