Home > other >  C + + + lua require return true not the table
C + + + lua require return true not the table

Time:04-08

C + + code using luaL_dostring (m_pLuaVM strText) call this period of lua
 

Package. The path=package. The path.. "; The ${V_LUA_PATH} an NCE - NeData - Ne. Lua
"Print (package. The path) - print directory
The local module=the require an NCE - NeData - "Ne" - include an NCE - NeData - Ne. Lua
For k, v in pairs (package. The loaded) do
Print (k, v) - print loading information
End
Module. Analye (strContext, tableRegetex [' Ne '], tabNet) - an error here




An NCE - NeData - Ne. Lua code
 
- an NCE - NeData - Ne. Lua
The local Ne={}

Function Ne. AnalyeNet (SRC, regext, array)
Print (1)
End

the return can be



Lua printed information

- this is printed
/usr/local/share/lua/5.3/? . Lua;/usr/local/share/lua/5.3/?/init. Lua;/usr/local/lib/lua 5.3//? . Lua;/usr/local/lib/lua 5.3//?/init. Lua; ./? . Lua; ./?/init. Lua;/MNT/HGFS/linux_plus/lua/NC/FileNameData lua;/MNT/HGFS linux_plus/lua/NC/ScriptData/an NCE - NeData - Ne. Lua
IO table: 0 x7fffe8014260
OS table: 0 x7fffe8013ed0
Math table: 0 x7fffe801d000
Sparase table: 0 x7fffe801fbe0
Bit32 table: 0 x7fffe801eb70
Fparase table: 0 x7fffe801f810
Utf8 table: 0 x7fffe801dee0
Fcreate table: 0 x7fffe801f030
_G table: 0 x7fffe8010c50
Package table: 0 x7fffe8013410
FileNameData. Lua true
The string table: 0 x7fffe801c840
Coroutine table: 0 x7fffe8013c30
The debug table: 0 x7fffe8011e60
Table table: 0 x7fffe8013f90

an NCE - NeData - Ne true


The last error

string "package. The path=package. The path.. ";/MNT/HGFS/li... "] : 94: attempt to index a Boolean value (local 'module')





CodePudding user response:

Why is this?
  • Related