Game Development Community

Bug in T3D Kinda neat when fixed

by Vince Gee · in Torque 3D Professional · 12/10/2013 (6:23 pm) · 5 replies

Hey guys,

I have been converting Gui's over to C# and I came across a gui called "ConsoleVarDlg.gui".

This neat little Gui allows you to see all variables matching a parameter inside the game. Kinda like using a watch in Torision.

To use it, you type something like this at the console...

InspectVars("$Pref*");

And it will pop a pretty window which shows you all vars that matched that filter with there value.

But, somewhere along the line the code must have been modified and if you type the command in stock, it will crash.

To fix the bug, open up the file "Field.cpp" and on line 391 add..

if ( !caption || !caption[0] )
      mCaption = getFieldName(); 
   else
      mCaption = caption;
    
	//VGee, this can actually be hit from the scripts w/ the ConsoleVarDlg screen.
	if ( mField != NULL )//<----This is what needs to be added.
   _setFieldDocs( mField->pFieldDocs );
}

Now, even if your running a production game or just want to see the value of some variable, you can just bring up the console and now type "InspectVars("someprefix*");" and see them in a handy dandy window.

I'd submit it to github but right now I don't have git set up on this computer.

Enjoy,

Vince
WinterleafEntertainment.Com





#1
12/10/2013 (7:49 pm)
Super useful - thanks for sharing!

#2
12/10/2013 (9:53 pm)
Cool, I went ahead and created a pull request for this here: github.com/GarageGames/Torque3D/pull/556
#3
12/10/2013 (10:38 pm)
Oh that's cool. Thanks for the tip!
#4
03/14/2014 (12:53 pm)
and merged :)
#5
03/18/2014 (4:21 pm)
post bookmarked