Jump to content
  • 0

attempt to call a nil value (global '')


putao

Question

Posted

my script show this error 

Script ended:

Script error: luaj.o: /storage/emulated/0/Download/[TEST]lua.lua:16

`AWP()`

attempt to call a nil value (global 'AWP')

level = 1, const = 34, proto = 0, upval = 1, vars = 11, code = 66

CALL v1..v1

 ; PC 38 CODE 0080405D OP 29 A 1 B 1 C 1 Bx 513 sBx -130558

stack traceback:

 /storage/emulated/0/Download/[TEST]lua.lua:16 in function 'START'

 /storage/emulated/0/Download/[TEST]lua.lua:299 in main chunk

 [Java]: in ?

 at luaj.LuaValue.a(src:2835)

 at luaj.LuaValue.Z(src:1966)

 at luaj.LuaValue.l(src:1393)

 at luaj.LuaClosure.a(src:533)

 at luaj.LuaClosure.l(src:160)

 at luaj.LuaClosure.a(src:533)

 at luaj.LuaClosure.l(src:160)

 at android.ext.Script.d(src:6056)

 at android.ext.Script$ScriptThread.run(src:5785)

 

what to do?

 

1 answer to this question

Recommended Posts

Posted
On 8/16/2021 at 1:27 PM, putao said:

my script show this error 

Script ended:

Script error: luaj.o: /storage/emulated/0/Download/[TEST]lua.lua:16

`AWP()`

attempt to call a nil value (global 'AWP')

level = 1, const = 34, proto = 0, upval = 1, vars = 11, code = 66

CALL v1..v1

 ; PC 38 CODE 0080405D OP 29 A 1 B 1 C 1 Bx 513 sBx -130558

stack traceback:

 /storage/emulated/0/Download/[TEST]lua.lua:16 in function 'START'

 /storage/emulated/0/Download/[TEST]lua.lua:299 in main chunk

 [Java]: in ?

 at luaj.LuaValue.a(src:2835)

 at luaj.LuaValue.Z(src:1966)

 at luaj.LuaValue.l(src:1393)

 at luaj.LuaClosure.a(src:533)

 at luaj.LuaClosure.l(src:160)

 at luaj.LuaClosure.a(src:533)

 at luaj.LuaClosure.l(src:160)

 at android.ext.Script.d(src:6056)

 at android.ext.Script$ScriptThread.run(src:5785)

 

what to do?

 

Make sure that you declared the function higher up in the script than when it's called so in other words make sure local function AWP() is above when you do AWP() in the script

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.