Преглед на файлове

zepto8: try to execute Lua code

This doesn’t work properly yet because PICO-8 uses a few language
extensions; we will have to decide whether to modify the Lua
interpreter, or change the code on the fly, or something entirely
different.
undefined
Sam Hocevar преди 10 години
родител
ревизия
cb10d6fbdf
променени са 1 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. +8
    -1
      src/lolua/baselua.cpp

+ 8
- 1
src/lolua/baselua.cpp Целия файл

@@ -37,7 +37,14 @@ class LuaBaseData
//Exec lua code -----------------------------------------------------------
static int LuaDoCode(LuaState *l, String const& s)
{
return luaL_dostring(l, s.C());
int status = luaL_dostring(l, s.C());
if (status == 1)
{
LuaString error; error.Get(l, -1);
msg::error("Lua error %s\n", error().C());
lua_pop(l, 1);
}
return status;
}

//Open a file and exec lua code -------------------------------------------


Зареждане…
Отказ
Запис