Post by Kiel on Jan 20, 2003 13:29:32 GMT -5
I am not a n00b. Okay, I've made it so that every second that goes by, one pice of food is deducted. When it gets down to zero, you are infected with a condition called hunger. This takes off 5 hp every step, and shows a pic in the top left corner that says FOOD IS LOW!! Now that's not my problem. My problem is buying food. I have Food stands all over the game, and they al teleport to one map-with a food shop. Now the system is like this: "Buy/Leave, Buy how much?, input 4 digit number, and it stores into a variable called "foodbuyamount"". I have a FOOD variable, and the problem is checking to see if you have the right amount of money. I put it so that it's a fork option. Then it says, if variable:"MONEY-parties money" is higher in amount to the variable: "amountbuyfood-the amount you want to buy, then proceed with the buying. Heres the problem: It always says that you do not have enough money to purchase the amount, even if you do. If this is too confusing, heres the code:
Sorry guys. I can't copy and paste the code. Any other ideas? Guess you'l just have to try and understand my writing. Hold up I'll write out the problem part of the code.
<>Fork Optn:Varbl[0009:money]-V[0008]abov
<>Variable Ch:[0007:FOOD]+ , Var.[0008] Decr.
<>Change Money: Money V[0008] Decr.
<>Variable Ch:[0008:amountbuyfood] Set, 0
<>Play SE: Success2
<>Messg:Thank you.
<>
: ELSE Case
<>Messg:I'm sorry, you do not have enough money.
Variable 0009 is: Parties money
Variable 0008 is: The amount of food to buy, 4digit input.
Variable 0007 is: Amount of food the parties has.
Sorry guys. I can't copy and paste the code. Any other ideas? Guess you'l just have to try and understand my writing. Hold up I'll write out the problem part of the code.
<>Fork Optn:Varbl[0009:money]-V[0008]abov
<>Variable Ch:[0007:FOOD]+ , Var.[0008] Decr.
<>Change Money: Money V[0008] Decr.
<>Variable Ch:[0008:amountbuyfood] Set, 0
<>Play SE: Success2
<>Messg:Thank you.
<>
: ELSE Case
<>Messg:I'm sorry, you do not have enough money.
Variable 0009 is: Parties money
Variable 0008 is: The amount of food to buy, 4digit input.
Variable 0007 is: Amount of food the parties has.