View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005369||The Dark Mod||Script/Def||public||26.10.2020 23:01||28.10.2020 06:18|
|Product Version||TDM 2.08|
|Summary||0005369: Scripting: sessionCommand() doesn't work|
|Description||I'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.
|Tags||No tags attached.|
As the fix for issue 3139, I added this line in idGameLocal::RunFrame()
ret.sessionCommand = 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.
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.