Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Difference between revisions of "eprint"

From Quake Wiki

m (Move page script moved page Eprint to eprint: Fixing the case)
 
Line 1: Line 1:
=== Function: eprint ===
+
''void'' '''eprint'''(''entity'' e)
  void eprint (entity e)
 
  
e = entity to print
+
== Usage ==
 +
Prints information about the passed entity to the console. Useful for debugging.
  
Print details about a given entity (for debug purposes).
+
=== Parameters ===
 +
*''e''
 +
:The entity to print information about.
 +
 
 +
== Example ==
 +
// Send out a debug message if an entity's target was invalid
 +
if (self.target)
 +
{
 +
    entity targ = find(world, targetname, self.target);
 +
    if (!targ)
 +
    {
 +
        eprint(self);
 +
        dprint("Entity has an invalid target\n");
 +
    }
 +
}

Latest revision as of 18:48, 31 July 2023

void eprint(entity e)

Usage[edit]

Prints information about the passed entity to the console. Useful for debugging.

Parameters[edit]

  • e
The entity to print information about.

Example[edit]

// Send out a debug message if an entity's target was invalid
if (self.target)
{
    entity targ = find(world, targetname, self.target);
    if (!targ)
    {
        eprint(self);
        dprint("Entity has an invalid target\n");
    }
}