View Issue Details

IDProjectCategoryView StatusLast Update
0005369The Dark ModScript/Defpublic28.10.2020 06:18
Reportergrayman Assigned To 
Status newResolutionopen 
Product VersionTDM 2.08 
Summary0005369: Scripting: sessionCommand() doesn't work
DescriptionI'm trying to use a script to dump the console to a file (rather than asking the player to run a condump command on the console).

I'm using the following syntax to do this:

    sys.sessionCommand("condump ws6_stats.txt"); // print statistics to file

The problem is that I see no evidence that the file gets written. I look in my mod folder (where condump files are usually written) and there's nothing there.

Does anyone know if I'm using the correct syntax?

I've used sessionCommand before with other console commands, w/o any problems.
TagsNo tags attached.




28.10.2020 05:32

administrator   ~0012847

As the fix for issue 3139, I added this line in idGameLocal::RunFrame()

ret.sessionCommand[0] = 0; // grayman 0003139 - must be cleared here, to handle the "player waiting" time

The condump sessionCommand is processed and set up to run in the background, which uses "ret" to hold the request. While the change above is needed to fix 3139, it's possible that the background request is being cleared out before it has a chance to run.

But ... commenting out the 'clear' line does NOT cause the background request to be processed. The request just disappears at some point that I was unable to track down.

Perhaps a different solution that doesn't clear the request is needed to fix 3139.

Something to look at.


28.10.2020 06:18

administrator   ~0012848

Starting from 2017, MSVC has "break when value changes" in context menu in watch.
You can set breakpoint at when the command is put into the variable (where it is lost later), then expand the watch entry to show individual characters, add such a memory breakpoint on the first character, and continue. It should break when the string is changed. Alternative approach is to do "break when value changes" on string length.

Issue History

Date Modified Username Field Change
26.10.2020 23:01 grayman New Issue
28.10.2020 05:32 grayman Note Added: 0012847
28.10.2020 06:18 stgatilov Note Added: 0012848