Page 1 of 1
Debug Logs not displayed
Posted: Thu Feb 02, 2017 8:17 pm
by Aekar
In CAMPAIGN.BSF I have :
FUNCTION STARTTURN( side, mode )
{
DebugLog("Starting new turn... ", 1);
}
.. but this log is not added to the file error.log or error_trace.txt.
.. I cannot put any log there it seems.
(tried in other files and functions which are executed)
Documentation says:
//output a string to the debug log error.log. Defaults to only writing the string if DebugMode is on, unless always is non-zero
DebugLog(string, [always])
Re: Debug Logs not displayed
Posted: Thu Feb 02, 2017 9:34 pm
by pipfromslitherine
StartTurn is only called in the scenario script, so the code is just not being run, hence no output
Cheers
Pip
Re: Debug Logs not displayed
Posted: Fri Feb 03, 2017 6:54 am
by Aekar
Point scored on that one!

However before posting I also tried in the following scripts:
CampaignDisplay2 : the script which manages region selection, battle initiation, skirmish initiation..
Init : from comments it's "Initilisation stuff called when a unit is created"
MapGenerate2 : the skirmish manager
... and no log is added.
I also added DEBUGMODE 1 in USER.TXT, just in case, but that should not be necessary.
I'll make other attempts with other log lines, but am really puzzled by this.
Re: Debug Logs not displayed
Posted: Fri Feb 03, 2017 4:08 pm
by pipfromslitherine
Try debugging with the debugger (add a DebugBreak; line or CTRL+F3) to see whether the code is being called. If it is then the line should appear in the error.log file.
Cheers
Pip
Re: Debug Logs not displayed
Posted: Sun Feb 05, 2017 9:11 am
by Aekar
It seems that debug or CTRL F3 work entirely when I am playing standard campaign, but do not seem to work in this part of the Warp in a custom campaign.
Either it is another problem with custom campaigns (located in My Documents/My Games/SANCTUS) or a human/technical error from me.
It seems the campaign triggers messages which are never seen or written because of the separation between the campaign and the skirmish scenario.
You have to know that I am generating a custom campaign which adds new enemies (Chaos Space Marines right now).
I know the code is executed; this is this code which generates Chaos Space Marines in skirmishes and they are there fighting me.
But it's possible that the code to generate them is executed before the skirmish, and once in the skirmish scenario everything is loaded up again so I must find another place to script.
I'll make more experiments in the skirmish scenario part.
EDIT:
Confirmed.
Debug lines are not shown where they are executed from campaign and before scenario is loaded.
But all lines executed once scenario is loaded are put into error_log.
Re: Debug Logs not displayed
Posted: Mon Feb 06, 2017 5:38 pm
by pipfromslitherine
I'm afraid I am not following what is going on.
Cheers
Pip