Index: trunk/src/lua/lua_state.cc
===================================================================
--- trunk/src/lua/lua_state.cc	(revision 184)
+++ trunk/src/lua/lua_state.cc	(revision 185)
@@ -264,4 +264,15 @@
 }
 
+void lua::table_guard::call_get()
+{
+	lua_gettable( L->L, -2 );
+}
+
+void lua::table_guard::call_get_raw()
+{
+	lua_rawget( L->L, -2 );
+}
+
+
 void lua::table_guard::get_raw_flags( const std::string& element, uint8* data, uint32 count )
 {
@@ -375,2 +386,32 @@
 	}
 }
+
+int lua::state::call_function( int nargs, int nresults )
+{
+	int status = lua_pcall( L, nargs, nresults, 0 );
+	if ( status != 0 )
+	{
+		std::string error = lua_tostring( L, -1 );
+		lua_pop( L, 1 );
+		NV_LOG( LOG_ERROR, "Lua error : " << error )
+	}
+	return status;
+}
+
+bool lua::state::push_function( const path& p, bool global )
+{
+	if ( !p.resolve( L, global ) )
+	{
+		lua_pop( L, 1 );
+		NV_LOG( LOG_ERROR, "Lua error : not a valid path - " + p.to_string() );
+		return false;
+	}
+
+	if ( !lua_isfunction( L, -1 ) ) 
+	{
+		lua_pop( L, 1 );
+		NV_LOG( LOG_ERROR, "Lua error : not a valid function - " + p.to_string() );
+		return false;
+	}
+	return true;
+}
