<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Facc_balance</id>
	<title>Manual:DIL Manual/acc balance - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Facc_balance"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/acc_balance&amp;action=history"/>
	<updated>2026-11-22T21:30:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/acc_balance&amp;diff=2800&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/acc_balance&amp;diff=2800&amp;oldid=prev"/>
		<updated>2026-11-14T22:59:24Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= acc_balance =&lt;br /&gt;
'''Field''' (integer, read-only; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.acc_balance : integer&lt;br /&gt;
&lt;br /&gt;
The credit left on the player's account, in coin units (cents: 100 is one unit of money), when the game runs with accounting (&amp;lt;code&amp;gt;accounting = 1&amp;lt;/code&amp;gt; in server.cfg). Any fraction of a coin unit is cut off.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* With accounting off (the default) it is always 0.&lt;br /&gt;
* Players only. On an NPC, an object, a room or null the field fails.&lt;br /&gt;
* It can't be assigned (vmc: &amp;quot;Illegal lvalue&amp;quot;). Change the account with [[Manual:DIL Manual/acc modify()|acc_modify()]], which only works from a zone with access level 0.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin show_account(pc : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.type != UNIT_ST_PC)&lt;br /&gt;
      return;&lt;br /&gt;
   sendtext(&amp;quot;Balance: &amp;quot; + itoa(pc.acc_balance / 100) + &amp;quot; (&amp;quot; +&lt;br /&gt;
            itoa(pc.acc_balance) + &amp;quot; cents), paid in so far: &amp;quot; +&lt;br /&gt;
            itoa(pc.acc_total) + &amp;quot; cents.&amp;lt;br/&amp;gt;&amp;quot;, pc);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Shows a player the account's balance and total.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/acc total|acc_total]]&lt;br /&gt;
* [[Manual:DIL Manual/acc modify()|acc_modify()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>