Debug Logs not displayed

Post Reply
Aekar
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Thu Nov 27, 2014 10:29 am

Debug Logs not displayed

Post 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])
pipfromslitherine
Site Admin
Site Admin
Posts: 9702
Joined: Wed Mar 23, 2005 10:35 pm

Re: Debug Logs not displayed

Post by pipfromslitherine »

StartTurn is only called in the scenario script, so the code is just not being run, hence no output :)

Cheers

Pip
follow me on Twitter here
Aekar
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Thu Nov 27, 2014 10:29 am

Re: Debug Logs not displayed

Post 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.
pipfromslitherine
Site Admin
Site Admin
Posts: 9702
Joined: Wed Mar 23, 2005 10:35 pm

Re: Debug Logs not displayed

Post 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
follow me on Twitter here
Aekar
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Thu Nov 27, 2014 10:29 am

Re: Debug Logs not displayed

Post 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.
pipfromslitherine
Site Admin
Site Admin
Posts: 9702
Joined: Wed Mar 23, 2005 10:35 pm

Re: Debug Logs not displayed

Post by pipfromslitherine »

I'm afraid I am not following what is going on.

Cheers

Pip
follow me on Twitter here
Post Reply

Return to “Sanctus Reach Mods and Scenario Design”