Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrXML
Strange Problem

Me_Myself_And_I
Guest
Quote
2010-05-14 19:37:56

Hi,
I think it's a really stupid Problem, but I do not find the problem.
I have the following XML Code:
<?xml version="1.0"?>
<options>
<Resolution w=1680 h=1050 />
<Video Driver=4 Windowmode=0 />
</options>


And this Function:


bool Game::loadOptions()
{
io::IrrXMLReader *Reader = io::createIrrXMLReader("Options.xml");

while(Reader && Reader->read())
{
switch(Reader->getNodeType())
{

case io::EXN_ELEMENT:
{
if( !strcmp(Reader->getNodeName(), "Resolution"))
{
Optionen.Resolution_w = Reader->getAttributeValueAsInt("w");
Optionen.Resolution_h = Reader->getAttributeValueAsInt("h");
}
else if(!strcmp(Reader->getNodeName(), "Video"))
{
Optionen.VideoDriver = static_cast<video::E_DRIVER_TYPE>(Reader->getAttributeValueAsInt("Driver"));
Optionen.WindowMode = static_cast<bool>(Reader->getAttributeValueAsInt("WindowMode"));
}
}
break;
}
}

// delete the xml parser after usage
delete Reader;

return true;
}


But it does not work. my debugger shows me, that it never enters the ifs. Can u tell me why?

greetings Me


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact