test.lua
--------------------------------------------------------------------------------------------------------
function Main()
local var1 = 123
end
--------------------------------------------------------------------------------------------------------
Main()
Script execution
Under FB debugging or after the DLL is generated, the execution is normal
--------------------------------------------------------------------------------------------------------
test.lua
--------------------------------------------------------------------------------------------------------
function Main()
local var1 = 123.123
end
Main()
--------------------------------------------------------------------------------------------------------
After adding decimals, it is normal under FB debugging
Generating DLL execution will cause the process to disappear
What went wrong is
The luaL_loadfile function
FB :
--------------------------------------------------------------------------------------------------------
sub Test()
Dim As lua_State Ptr L
L = luaL_newstate()
luaL_openlibs(L)
OutputDebugString("[DBG]Path:" + ExePath())
If (luaL_loadfile(L, ExePath() + "\test.lua") <> 0 ) Then
OutputDebugString("[DBG]LuaErr1:" + *lua_tostring(L,-1))
Return
Else
If lua_pcall(L,0,0,0) <> 0 Then
OutputDebugString("[DBG]LuaErr2:" + *lua_tostring(L,-1))
EndIf
lua_close( L )
Endif
end
x64 lua.a problem has never been solved: ask the great god for help
Who is online
Users browsing this forum: No registered users and 2 guests