Calculating

Started by Saberteeth, Sat 18/11/2006 12:59:51

Previous topic - Next topic

Saberteeth

Hi!

I want to make a calcualtor in a way. I want the script to remember the values of each item in the list box and then when I write the numbers into the text box, the calculator would display the result(eg. item ammount+number I typed into).
I also want all the items to start with 0 and when they are clicked upon, the calculator would add the ammount I type into the text box to the item ammount and when I click another item and write an ammount, it would add it again etc. How would I make such a calculator. I know it has something to do with ints but my scripting knowlege is to small to make something as complex as this.

Khris

I'd help you but I have a hard time understanding what you wrote.
Could you maybe post an excel screenshot or something to explain your problem?

Saberteeth

#2
ok sorry for not being clear. i'll try to rephrase:

Lets say that you have a lot of different types of items. And you want to calculate how many items you have in total. Eg. ribbons. You have 10 red ribbons, 15 blue ribbons and 94 green ribbons. Now, I make an item into a list box, called ribbons. I want(when you click on the ribbons) to see how many ribbons have been added.
So when I write 10 into the textbox and press +(button), the total number of ribbons would be 10. But when I write 15 into the textbox and press + again, it would display 25 in total in the label.
I hope I've made this a little more clear.

Khris

So you have a GUI that looks something like this, correct?


Just want to make sure before I start to explain stuff.

Saberteeth

Yes, it would look like that, it's just that I would have like 30-40  items in the list box.

SMF spam blocked by CleanTalk