I use this :
Code: Select all
if (core::stringw("Mana") == xmlReader->getNodeName())
{SavedPlayerMana = xmlReader->getAttributeValue(L"manavalue2");}
<Mana manavalue2="2000" />
After reading my .xml file i want to convert value to in-game integer:
Code: Select all
int receiveSavedMana;
receiveSavedMana= atoi(SavedPlayerMana.c_str());
playermana = receiveSavedMana;
At the end of read xml function i have xmlReader->drop();
But when i use this in game , unfortunately my Mana drops from (start 100) to 0 ;/ (and it should get 2000 value)
I'm also using my 'read xml' function when playing game (not at the start)
Can you help me what i'm doing wrong ?