use ActorUtil::GetWhere

This commit is contained in:
Glenn Maynard
2006-10-09 08:08:59 +00:00
parent 8e8a10f56c
commit f1ca420069
11 changed files with 27 additions and 28 deletions
+4 -4
View File
@@ -218,7 +218,7 @@ void Actor::LoadFromNode( const RString& sDir, const XNode* pNode )
/* If parameters are specified here, save their values to the actor. */
RString sName;
if( !pChild->GetAttrValue( "Name", sName ) )
RageException::Throw( "Input node in \"%s\" is missing the attribute \"Name\".", sDir.c_str() );
RageException::Throw( "%s: Input: missing the attribute \"Name\"", ActorUtil::GetWhere(pNode).c_str() );
bool bOptional = false;
pChild->GetAttrValue( "Optional", bOptional );
@@ -228,7 +228,7 @@ void Actor::LoadFromNode( const RString& sDir, const XNode* pNode )
ActorUtil::GetParam( L, sName );
if( lua_isnil(L, -1) && !bOptional )
RageException::Throw( "Actor in \"%s\" requires parameter \"%s\" that is not set.", sDir.c_str(), sName.c_str() );
RageException::Throw( "%s: Actor requires parameter \"%s\" that is not set", ActorUtil::GetWhere(pNode).c_str(), sName.c_str() );
lua_settable( L, -3 );
lua_pop( L, 1 );
@@ -238,13 +238,13 @@ void Actor::LoadFromNode( const RString& sDir, const XNode* pNode )
{
RString sName;
if( !pChild->GetAttrValue( "Name", sName ) )
Dialog::OK( ssprintf("Context node in '%s' is missing the attribute \"Name\"", sDir.c_str()), "MISSING_ATTRIBUTE" );
Dialog::OK( ssprintf("Context node in '%s' is missing the attribute \"Name\"", ActorUtil::GetWhere(pNode).c_str()), "MISSING_ATTRIBUTE" );
this->PushContext(L);
lua_pushstring( L, sName );
if( !pChild->PushAttrValue( L, "Value" ) )
Dialog::OK( ssprintf("Context node in '%s' is missing the attribute \"Value\"", sDir.c_str()), "MISSING_ATTRIBUTE" );
Dialog::OK( ssprintf("Context node in '%s' is missing the attribute \"Value\"", ActorUtil::GetWhere(pNode).c_str()), "MISSING_ATTRIBUTE" );
lua_settable( L, -3 );
lua_pop( L, 1 );