[SDK] Problems with gDLL->logMsg()

dvdundvideo

Chieftain
Joined
Feb 12, 2009
Messages
4
Hello Guys,

after a long time just reading, i got my first problem for what i didn´t find an answer:

I want to log some values in the function CvCityAI::AI_assignWorkingPlots() but, when i use gDLL->logMsg(), my log file remains empty. I also tried to copy the code from CvGlobals::getInfoTypeForString()

Code:
CvString szError;
szError.Format("info type %s not found, Current XML file is: %s", szType, GC.getCurrentXMLFile().GetCString());
FAssertMsg(strcmp(szType, "NONE")==0 || strcmp(szType, "")==0, szError.c_str());
gDLL->logMsg("xml.log", szError);

with the same effect.(no new entry in xml.log)

Has anyone an Idea what i have to to?

thx in advance
dvdundvideo
 
Start by verifying that you can get logging messages at all.

Code:
gDLL->logMsg("xml.log", "hi");

Looking at the code, I'm not sure if you have it set up to do what you want it to do. What I see is that if there is an error, the program terminates without logging an message. If there is no error, the error message is written to the log. Is this what you want?
 
Thanks man!

That was it! Such an apparent error...
I thought, it was enabled, because of the updated xml.log.

Now it works...:)
 
Back
Top Bottom