BurSimScriptObject.cpp
/*--- function CrackFormID -----------------------------------
 *
 *  Given a form ID, returns the index of the form file, 
 *  and of the form within that file.
 *
 *  Entry:  szFormID    is the Form ID of form FormFileIndex|FormIndexWithinFile
 *
 *  Exit:   Returns 0 if success, else non-zero if bad formid.
 */
function CrackFormID
Given a form ID, returns the index of the form file,
and of the form within that file.



Returns 0 if success, else non-zero if bad formid.
function CrackFormID Given a form ID returns the index of the form file and of the form within that file . Returns 0 if success else non - zero if bad formid .
int CBurSimScriptObject::CrackFormID(LPCTSTR szFormID, int &nFormFile, int &nForm)
{
   nFormFile = -1, nForm = -1;
   sscanf(szFormID,"%d|%d",&nFormFile, &nForm);
   if(nFormFile<0 || nForm<0 || nFormFile>Mix[m_so_mixnum].m_aryFormFiles.GetSize()
      || nForm>Mix[m_so_mixnum].m_aryFormFiles[nFormFile].m_aryForms.GetSize()) {
      return 1;
   }
   return 0;
}
int CBurSimScriptObject :: CrackFormID ( LPCTSTR szFormID , int & nFormFile , int & nForm ) { nFormFile = -1 , nForm = -1 ; sscanf ( szFormID , " " , & nFormFile , & nForm ) ; if ( nFormFile < 0 || nForm < 0 || nFormFile > Mix [ m_so_mixnum ] . m_aryFormFiles . GetSize ( ) || nForm > Mix [ m_so_mixnum ] . m_aryFormFiles [ nFormFile ] . m_aryForms . GetSize ( ) ) { return 1 ; } return 0 ; }
function CrackFormID
  Given a form ID, returns the index of the form file,
  and of the form within that file.
function CrackFormID Given a form ID returns the index of the form file and of the form within that file .