View Single Post
  #8  
Old 03-08-2003, 12:11 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by adam


Sure you could do it that way. But you wouldn't be able to do things like, sort through them all and figure out what's where. Or automatically sort through them and check for empties and delete them. Or add interest automatically. Or easily list all the accounts in the bank and the total cash in the bank.

The accounts themselves are all in separate strings, it's just thier names that are in the one string. So the Bank npc can easily see what accounts it manages.
A good way to get a total value of funds is through a for() loop

NPC Code:

for (this.i=0; this.i<(maxaccounts); this.i++) {
setstring banktotoal,#v(strtofloat(#s(banktotal))+strtofloat (#s(bank_account#v(this.i)));
}



I'm not positive if that will work though. I've been away from Graal for a little too long :x
__________________
Reply With Quote