  In their 1997 paper, Schneider and Stuhler gave a formula relating the value
of an admissible character of a $p$-adic group at an elliptic element to the
fixed point set of this element on the Bruhat-Tits building. Here we give a
similar formula which works for compact elements. Elliptic elements have
finitely many fixed facets in the building but compact elements can have
infinitely many. In order to deal with the compact case we truncate the
building so that we only look at a bounded piece of it. We show that for
compact elements the (finite) information contained in the truncated building
is enough to recover all of the information about the character. This works
since the fixed point set of a compact (non elliptic) element is periodic. The
techniques used here are more geometric in nature than the algebraic ones used
by Schneider and Stuhler. We recover part of their result as a special case.
