LPlate2
Warlord
- Joined
- Dec 27, 2018
- Messages
- 299
Hi,
I'm trying to create an array of integers from xml. At this stage it compiles for me but I'm still getting 0 for every entry in the array. What have I done wrong here?
I'm trying to create an array of integers from xml. At this stage it compiles for me but I'm still getting 0 for every entry in the array. What have I done wrong here?
Spoiler :
Code:
m_paiImageDims(NULL),
Code:
SAFE_DELETE_ARRAY(m_paiImageDims);
Code:
int CvUnitInfo::getImageDims(int i) const
{
FAssertMsg(i < getNumImages(), "Index out of bounds");
FAssertMsg(i > -1, "Index out of bounds");
return (m_paiImageDims) ? m_paiImageDims[i] : -1;
}
Code:
SAFE_DELETE_ARRAY(m_paiImageDims);
m_paiImageDims = new int[m_iNumImages];
stream->Read(m_iNumImages, m_paiImageDims);
Code:
stream->Write(m_iNumImages, m_paiImageDims);
Code:
if (gDLL->getXMLIFace()->SetToChildByTagName(pXML->GetXML(),"ImageDims"))
{
pXML->InitList(&m_paiImageDims, getNumImages());//fix this line?
gDLL->getXMLIFace()->SetToParent(pXML->GetXML());
}