This commit is contained in:
Glenn Maynard
2006-08-16 01:56:54 +00:00
parent 4ab47c8f0c
commit bf3d73fcef
+2 -10
View File
@@ -196,27 +196,19 @@ Actor* ActorUtil::LoadFromNode( const RString& sDir, const XNode* pNode, Actor *
{ {
RString sName; RString sName;
if( !pChild->GetAttrValue( "Name", sName ) ) if( !pChild->GetAttrValue( "Name", sName ) )
{
Dialog::OK( ssprintf("Param node in '%s' is missing the attribute \"Name\"", sDir.c_str()), "MISSING_ATTRIBUTE_WARNING" ); Dialog::OK( ssprintf("Param node in '%s' is missing the attribute \"Name\"", sDir.c_str()), "MISSING_ATTRIBUTE_WARNING" );
}
LuaHelpers::RunAtExpressionS( sName ); LuaHelpers::RunAtExpressionS( sName );
RString s; RString s;
if( pChild->GetAttrValue( "Value", s ) ) if( !pChild->GetAttrValue( "Value", s ) )
{ Dialog::OK( ssprintf("Param node in '%s' is missing the attribute \"Value\"", sDir.c_str()), "MISSING_ATTRIBUTE_WARNING" );
Lua *L = LUA->Get(); Lua *L = LUA->Get();
LuaHelpers::RunScript( L, "return " + s, "", 1 ); LuaHelpers::RunScript( L, "return " + s, "", 1 );
SetParamFromStack( L, sName, &setOldParams[sName] ); SetParamFromStack( L, sName, &setOldParams[sName] );
LUA->Release(L); LUA->Release(L);
} }
else
{
Dialog::OK( ssprintf("Param node in '%s' is missing the attribute \"Value\"", sDir.c_str()), "MISSING_ATTRIBUTE_WARNING" );
}
}
} }
} }