BOOL CTextFileLoader::SetChildNode(DWORD dwIndex)
{
if (!m_pcurNode)
{
MessageBoxA(NULL, "Node to access has not set!", "TextFileLoader Debug", MB_OK | MB_ICONERROR);
return FALSE;
}
if (dwIndex >= m_pcurNode->ChildNodeVector.size())
{
char szBuf[512];
_snprintf(szBuf, sizeof(szBuf),
"Node index out of range!\n\n"
"Tried Index : %u\n"
"Max Allowed : %u\n\n"
"File : %s\n"
"Line : %d",
dwIndex,
(DWORD)m_pcurNode->ChildNodeVector.size(),
__FILE__,
__LINE__);
MessageBoxA(NULL, szBuf, "TextFileLoader Debug", MB_OK | MB_ICONERROR);
return FALSE; // assert yerine sadece FALSE döndür
}
m_pcurNode = m_pcurNode->ChildNodeVector[dwIndex];
return TRUE;
}