A
          / \      _             Play Now                         Nemesis on fb
          | |     | |  _______   _        _   _______    _______   _    _______
          | |\    | | |   ____| |  \    /  | |   ____|  /   ____| | |  /   ____|
 /-------/-------------------------------------------------------------------,
O= Home <=XX|  About  News  Pics  Adventurers  Wizards  Download  Connect     >
 \-------\-------------------------------------------------------------------'
          | |   \   | |  |____  | |      | | |  |____   ___ \  \  | |  ___ \  \
          | |     \_| |_______| |_|      |_| |_______| |_______/  |_| |_______/
          \ /
           V  

Documentation Area

Document Path: /doc/living/query_money


Name: query_money - get the amount of money a living has

Syntax:
	#include <currency.h>
	int query_money(int currency)

Description:
	The query_money call returns the amount of money a living has.
	
	Valid values for the currency argument (which are listed in
	/include/currency.h):

	C_STANDARD - standard Nemesis currency (coins)
	C_VIKING   - viking currency (oere)
	C_ORIENT   - orient currency (yen)

Return value:
	With the old money system the currency argument is ignored and the
	amount of gold coins is returned.

	With the new money system: If the currency argument is left off, the
	amount of copper coins is returned (for compatibility). Else the
	money arrey (length three) for the given currency is returned.

Examples:
	Old system:
		int money;
		money=this_player()->query_money();
	New system:
		int *money, gold_coins, silver_coins, copper_coins;
		money=this_player()->query_money(C_STANDARD);
		gold_coins=money[0];
		silver_coins=money[1];
		copper_coins=money[2];

See also:


This page was generated in LPC

Imprint / Impressum