Re: A few more jobs/qustions

From: Ben Leibig (leibig@robin.bvsd.k12.co.us)
Date: 11/20/95


On Mon, 20 Nov 1995 BryanRoach@aol.com wrote:

> In a message dated 95-11-20 02:18:34 EST, you write:
> 
> >3: I want to spit coins up into 3 diffrent units.  IE 1 gold = 1000 copper
> >1 silver = 100 copper.  IS there a way i can do this(Having the current 
> >coin uinit be copper)  Basicly it would have to change all of the verable 
> >from where it normaly saiod #of coins to # gold coins, # silver pennies, 
> ># copper pennies.  This includes shops, sc, and anywhere else
> 
> Actually.... You really wouldn't need 3 variables, just some fancy math...
> If you have 3 currency denominators, the easy way is to just declare the
> variable as floating point instead of integer, then base your money system
> off decimal places to determine what coins the charater has. For example...
> 
> 150.23  
> a good system here would be:
> 1 silver = 100 copper
> 1 gold = 100 silver 
> 
> In the case above,  by grabbing the decimal place value of the floating point
> variable, the character would have 23 copper, 50 silver, and 1 gold piece. 
> 
> - Brian
> 
OK well i dont know crap about coding
2 quetions
then what if someone has 30 gold.  Or no gold at all.  And second how do 
implament this?



This archive was generated by hypermail 2b30 : 12/07/00 PST