diff --git a/src/lua_baselib.c b/src/lua_baselib.c
index e6efb40e451a7fba8bd5cd8a7c732d0dba8cdb09..e53ec252367c4944ef13c26192eede22a651174a 100644
--- a/src/lua_baselib.c
+++ b/src/lua_baselib.c
@@ -1682,6 +1682,25 @@ static int lib_rSetPlayerSkin(lua_State *L)
 	return 0;
 }
 
+// R_DATA
+////////////
+
+static int lib_rCheckTextureNumForName(lua_State *L)
+{
+	const char *name = luaL_checkstring(L, 1);
+	//HUDSAFE
+	lua_pushinteger(L, R_CheckTextureNumForName(name));
+	return 1;
+}
+
+static int lib_rTextureNumForName(lua_State *L)
+{
+	const char *name = luaL_checkstring(L, 1);
+	//HUDSAFE
+	lua_pushinteger(L, R_TextureNumForName(name));
+	return 1;
+}
+
 // S_SOUND
 ////////////
 
diff --git a/src/lua_maplib.c b/src/lua_maplib.c
index efe9e6f4c61650027a0dddb2e07f1ff9f6056052..5eb6cb4a1471fa9b616e580adf87849ea9b5115d 100644
--- a/src/lua_maplib.c
+++ b/src/lua_maplib.c
@@ -795,16 +795,16 @@ static int side_set(lua_State *L)
 		side->rowoffset = luaL_checkfixed(L, 3);
 		break;
 	case side_toptexture:
-        side->toptexture = luaL_checkinteger(L, 3);
+		side->toptexture = luaL_checkinteger(L, 3);
 		break;
 	case side_bottomtexture:
-        side->bottomtexture = luaL_checkinteger(L, 3);
+		side->bottomtexture = luaL_checkinteger(L, 3);
 		break;
 	case side_midtexture:
-        side->midtexture = luaL_checkinteger(L, 3);
+		side->midtexture = luaL_checkinteger(L, 3);
 		break;
 	case side_repeatcnt:
-        side->repeatcnt = luaL_checkinteger(L, 3);
+		side->repeatcnt = luaL_checkinteger(L, 3);
 		break;
 	}
 	return 0;