Game Development Community

Way to write to console from server\scripts\player.cs?

by Highlander · in Torque Game Engine · 05/17/2007 (2:28 am) · 2 replies

Any way of writing some debug info to the console from server script player.cs??

#1
05/17/2007 (2:38 am)
You should just be able to use the standard echo(), error() and warn() commands to write a line to the console.
#2
05/17/2007 (5:48 am)
Eikon got it right. Echo is the most common command I use for debugging TS.

Echo a string:
function foo()
{
      %bSomeValue = true;
     
      if(%bSomeValue)
           [b]echo("Some Value was true");[/b]
}


Echo and string manipulation for a value:
function foo()
{
      %bSomeValue = true;
     
      if(%bSomeValue)
           [b]echo("bSomeValue =" @ %bSomeValue);[/b]
}

Also, I found this resource by Orion to be very helpful in script debugging: Get Function Scope Name