Index: trunk/src/lua/lua_state.cc
===================================================================
--- trunk/src/lua/lua_state.cc	(revision 265)
+++ trunk/src/lua/lua_state.cc	(revision 288)
@@ -148,5 +148,5 @@
 {
 	lua_getfield( m_state, -1, element.c_str() );
-	bool result = lua_isnil( m_state, -1 );
+	bool result = !( lua_isnil( m_state, -1 ) );
 	lua_pop( m_state, 1 );
 	return result;
@@ -189,4 +189,13 @@
 	lua_getfield( m_state, -1, element.c_str() );
 	double result = lua_type( m_state, -1 ) == LUA_TNUMBER ? lua_tonumber( m_state, -1 ) : defval;
+	lua_pop( m_state, 1 );
+	return result;
+}
+
+
+float nv::lua::table_guard::get_float( const std::string& element, float defval /*= 0.0 */ )
+{
+	lua_getfield( m_state, -1, element.c_str() );
+	float result = lua_type( m_state, -1 ) == LUA_TNUMBER ? (float)lua_tonumber( m_state, -1 ) : defval;
 	lua_pop( m_state, 1 );
 	return result;
