I’m trying to write a new require function (called "require2" to avoid confusion). This function should pause (suspend) the Lua state, wait for the server to send the .lua file, and then run the .lua file and continue (resume). I couldn’t get this to work in Lua 5.1, 5.4.2, or using LuaJit. It always results ..
Category : luajit
I’m currently trying to implement LUA into my CPP program however I am having the following issue: I have a library in lua lets say lib.lua that I’d like to be ran into runtime so that other lua scripts can access it however I’m having issues with that here’s my code: /* initialize Lua */ ..
For historical reasons, I am constructing a struct in C++ that emulates a lua Table. typedef union Value Value; typedef struct LuaTable LuaTable; typedef struct TableValue TableValue; enum ValueType { INT = 0, BOOL = 1, FLOAT = 2, STRING = 3, TABLE = 4, }; struct LuaTable { std::vector<TableValue> array; std::map<std::string, TableValue> hashmap; }; ..
I try to embed Lua in my program using sol library. Embedding Lua 5.3 works great, but I want to replace it with LuaJIT in order to gain this speed boost for scenarios written in Lua. I use this code (as an example, not real code): #define SOL_ALL_SAFETIES_ON 1 #include <iostream> #include <sol.hpp>// or #include ..
Recent Comments