Plug up some holes with lib_cvRegisterVar
Compare changes
+ 61
− 15
@@ -313,36 +313,57 @@ static int lib_cvRegisterVar(lua_State *L)
@@ -313,36 +313,57 @@ static int lib_cvRegisterVar(lua_State *L)
#define TYPEERROR(f, t) FIELDERROR(f, va("%s expected, got %s", lua_typename(L, t), luaL_typename(L, -1)))
// and converts them to CV_PossibleValue_t {{0,"MIN"},{9999,"MAX"}} or {{0,"Red"},{1,"Green"},{2,"Blue"}}
@@ -353,7 +374,8 @@ static int lib_cvRegisterVar(lua_State *L)
@@ -353,7 +374,8 @@ static int lib_cvRegisterVar(lua_State *L)
@@ -367,7 +389,8 @@ static int lib_cvRegisterVar(lua_State *L)
@@ -367,7 +389,8 @@ static int lib_cvRegisterVar(lua_State *L)
@@ -381,11 +404,18 @@ static int lib_cvRegisterVar(lua_State *L)
@@ -381,11 +404,18 @@ static int lib_cvRegisterVar(lua_State *L)
FIELDERROR("PossibleValue", va("%s or CV_PossibleValue_t expected, got %s", lua_typename(L, LUA_TTABLE), luaL_typename(L, -1)))
@@ -400,18 +430,34 @@ static int lib_cvRegisterVar(lua_State *L)
@@ -400,18 +430,34 @@ static int lib_cvRegisterVar(lua_State *L)
return luaL_error(L, "failed to register cvar (probable conflict with internal variable/command names)");