I'm working on a Lua project using the Harfang Lua Standalone, everything is going OK but I have a question regarding the 'require' statement.
When invoked from the main Lua script (the one I pass to the standalone), everything seems ok :
game_init = require("game_init")
However, when 'require' is called from a Logic Script (added to a node using a script component), using the very same syntax, I get this message :
error: On VM script|Logic - [string "player.lua"]:3: attempt to call global 'require' (a nil value)
warn: Initialization of script 'player.lua' failed (script error)
The file 'common.lua' is in the same folder.
Any idea of what's going on ?
Here is the whole project. Please uncomment the line 3 of 'player.lua' :