I am not sure if this is being caused due to user inexperiance, but if I had to put money down I would go with that. . . So, if anyone has a spare moment or three; below is an image better describing what I am talking about, the XML source, and the relavent part of the application source. Thank you in advanced to anyone that takes the time to look over this
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<!-- irrGame Configuration File -->
<config>
<graphics driver="EDT_OPENGL" width="800" height="600" depth="32" fullscreen="false" vsync="false" shaders="false" />
<network port="1024" ip="127.0.0.1" timeout="30" />
</config>
Code: Select all
//SNIP
m_hXMLConfig = g_pGlobals->pDevice->getFileSystem()->createXMLReaderUTF8("./datas/config.xml");
if(!m_hXMLConfig)
{
CLogger::writeLog("CServer::Init <Failed> : Could not read configuration file.");
return false;
}
// Read through XML Configuration file.
while(m_hXMLConfig->read())
{
switch(m_hXMLConfig->getNodeType())
{
case irr::io::EXN_ELEMENT:
if(strcmp("port",m_hXMLConfig->getNodeName()))
{
CLogger::writeLog("CServer::Init() <Note> : Port number found.");
m_iPort = m_hXMLConfig->getAttributeValueAsInt("port");
printf("Port number being the following: %i\n",m_iPort);
}
break;
}
}
m_hXMLConfig->drop();
//SNIP