Page 1 of 1
How do you view debugging output?
Posted: Sun Mar 12, 2006 12:06 pm
by [RDH]Zerted
In my script I have a string and I want to see its value so I know if everything is working. Is there any way I can do this?
The only way I can thing of, is creating a file then writing the string to that file. There has to be an easier way than this. Anyone?
RE: How do you view debugging output?
Posted: Mon Mar 13, 2006 11:47 pm
by [RDH]Zerted
So anyone have any ideas on getting output other than using ShowMessageText() ? Developers, where is print() displaying to and how can I view its output?
RE: How do you view debugging output?
Posted: Tue Mar 14, 2006 3:04 am
by PAN-Fnord
print() is displaying to the stdout of the program, and I forget if print() is disabled in release builds or not. If it does work, print() should output to the logfile from BF2_modtools.exe.
Maybe you could just display an objective-update message with that string, instead...
Mike Z
RE: How do you view debugging output?
Posted: Tue Mar 14, 2006 4:04 am
by [RDH]Zerted
Thanks. Now if I had only bought the cd version...
I'm only seeing UpdateObjectiveMessage() in ObjectiveSpaceAssault.lua. I'm not really sure what the objective message that is being updated is.
My end goal is to limit the type of units a player can use based on the rank in the player's user name (BFG tournment members have ranks). I can determine if a string contains a rank by using find(), but I don't think I've been able to get the player's name. I can't really tell because I don't have a way to output the string I'm testing. Can you think of anything else that might help with this?
RE: How do you view debugging output?
Posted: Tue Mar 14, 2006 3:22 pm
by PAN-Fnord
If you want to display something in the "X Killed Y" display list, you can use
ShowMessageText(string)
optionally you can give it a team number that you have defined to only show it to that team
ShowMessageText(string, REP)
CTF uses this for flag notifications.
Mike Z
RE: How do you view debugging output?
Posted: Fri Mar 17, 2006 2:49 pm
by [RDH]Zerted
Is there a way to tell it what X is? For example, can I somehow pass in "whatever" in ShowMessageText so it says "whatever killed Y" instead of "X killed Y" or are those variables hard coded inside the game? I know I could do ShowMessageText( "message.whatever" ), but can it be done the other way?