Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "eprint"
From Quake Wiki
(New page: === Function: eprint === void eprint (entity e) e = entity to print Print details about a given entity (for debug purposes).) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ''void'' '''eprint'''(''entity'' e) | |
− | |||
− | |||
− | + | == Usage == | |
+ | Prints information about the passed entity to the console. Useful for debugging. | ||
+ | |||
+ | === 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"); } }