IN NEED OF SOME CODING HELP...

Posts

Pages: 1
Erynden
Gamers don't die, they respawn.
1702
Alright, I am trying to do this in RM2k3. My problem is in this custom menu I am attempting to make(which is coming along quite well) I have come to a stand still with a problem I do not know how to solve. The menu is a Map Menu. Here are the problems...

The Menu(It ain't graphically pretty or awesome but it works for me.):


Problem #1: The money. All I know is, I have a variable that is set equal to Money, and every time I increase the money, the digits do not do anything and I am also troubling on what to do if the digits go over the singular. For example, for the first digits go from 0-9, do I have to do more pages for 10s, 100s, and 1000s. Cause I don't think there is enough pages.
Damn I wanna help, but I gotta head to class and won't be back for a while.
I'll tell you what I'd do, before I go.

I'd have 2 variables, one for the party's cash and another to do some calculation.
First digit is = to Party's cash variable, but when that variable is > 10 you put a 1 in the 2nd digit and make the 2nd variable = whatever the party's cash is - 10 and make the first digit = to whatever the 2nd variable's value now is (So if the party had 19 gold it would - 10 and put 1 as the 2nd digit leaving 9 as the first.)

I hope you get where I'm going. If no one is able to help you before I get back I'll explain better.
A nice tutorial on how to break a 4-digit variable into a set of four 1-digit numbers is probably what you want. See here:
http://www.wombatrpgs.frih.net/phpBB2/faq.php#1

After that, each event should display like you would with 10 pages. There are other ways with pictures, but this is the easiest.
Erynden
Gamers don't die, they respawn.
1702
@VRasta:
I think I get ya, but wouldn't that interfere with spending money to buy items, equips, and such with using two variables?

@wombats:
Alright, so... your FAQ is telling me I would need to make different variables for each place and divide them by their place number ? Or use the same variable and do that, causes I quite don't understand. My apologizes.
Yeah, you need to make different variables for each place, but you need to run them through Modulo, subtraction, and division as well. I highly recommend you look at that Modulo page on Wikipedia, and examine the pseudocode provided.
Erynden
Gamers don't die, they respawn.
1702
Wombat... Your FAQ is really, really confusing. To me at least... I don't quite get it at all...
Pages: 1