From: Anders R. <ma...@us...> - 2003-10-24 20:07:33
|
Update of /cvsroot/planeshift/planeshift/src/server/bulkobjects In directory sc8-pr-cvs1:/tmp/cvs-serv24117/src/server/bulkobjects Modified Files: dictionary.cpp Log Message: - Removed/added some debug output. - Fixed a test in ParseResponseScript to check for empty strings as well as null strings. Index: dictionary.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/dictionary.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dictionary.cpp 24 Oct 2003 07:37:40 -0000 1.4 --- dictionary.cpp 24 Oct 2003 20:03:09 -0000 1.5 *************** *** 50,56 **** { return true; ! } ! } ! } return false; } --- 50,56 ---- { return true; ! } else Error1("Failed to load Responses"); ! } else Error1("Failed to load Triggers"); ! } else Error1("Failed to load Synonyms"); return false; } *************** *** 355,359 **** bool NPCDialogResponse::ParseResponseScript(const char *xmlstr) { ! if (!xmlstr) { SayResponseOp *op = new SayResponseOp; --- 355,359 ---- bool NPCDialogResponse::ParseResponseScript(const char *xmlstr) { ! if (!xmlstr || strcmp(xmlstr,"")==0) { SayResponseOp *op = new SayResponseOp; *************** *** 367,370 **** --- 367,371 ---- if ( error ) { + Error2("Error in XML: %s", error ); return false; } |