# TP.js — savePos() (satır 107) [← TP.js](index.md) · [← Master](../../wiki.md) ```javascript function savePos(p) { var s = p.getStates(); var pos = p.getPosition(); s.setString(LASTPOS_KEY, pos.x.toFixed(3) + "," + pos.y.toFixed(3) + "," + pos.z.toFixed(3)); } ```