Reply To: Debugging Support for Lua

Home Forums General Programming Debugging Support for Lua Reply To: Debugging Support for Lua

#30357
atom
Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    This is how it should look like (the fact that it doesn’t is my stupidity and the fact that i didn’t read the manual), this seems to work (ctrlr is not crashing):

    lua_pushcfunction(luaState, luaopen_base);
        lua_pushliteral(luaState, "base");
        lua_call(luaState, 1, 0);
    
        lua_pushcfunction(luaState, luaopen_table);
        lua_pushliteral(luaState, "table");
        lua_call(luaState, 1, 0);
    
        lua_pushcfunction(luaState, luaopen_string);
        lua_pushliteral(luaState, "string");
        lua_call(luaState, 1, 0);
    
        lua_pushcfunction(luaState, luaopen_math);
        lua_pushliteral(luaState, "math");
        lua_call(luaState, 1, 0);
    
        lua_pushcfunction(luaState, luaopen_io);
        lua_pushliteral(luaState, "io");
        lua_call(luaState, 1, 0);
    
        lua_pushcfunction(luaState, luaopen_debug);
        lua_pushliteral(luaState, "debug");
        lua_call(luaState, 1, 0);
    
        lua_pushcfunction(luaState, luaopen_package);
        lua_pushliteral(luaState, "package");
        lua_call(luaState, 1, 0);
    Ctrlr