Negative Sign on Needed Amount
This is really bothering me I have a XP Mod and Im trying to set up how much XP they need to get an item and this is how i have it set up and for some reason this damn negative sign shows up
PHP Code:
PHP Code:
You need -200 more XP to buy this item, lets just say it cost 500 and i have 300 it says i need -200 more |
Re: Negative Sign on Needed Amount
Quote:
> is greater than Also, you want to allow them to buy it if their XP is equal to the cost. So, PHP Code:
PHP Code:
|
Re: Negative Sign on Needed Amount
Thanks, alot. I Already know < is less than but
PHP Code:
PHP Code:
|
Re: Negative Sign on Needed Amount
You made a simple mistake with your math, chief.
You should be using ( cost - exp ) to determine xp needed. Example: Cost = 500 Exp = 300 500 - 300 = 200 What you are doing: Exp - cost 300 - 500 = -200 |
Re: Negative Sign on Needed Amount
Exactly bugsy. Lol, common sense, the only thing that would make it negative is the subtraction. Changing the > sign won't change the value of it, it would just change who it's showed to.
|
Re: Negative Sign on Needed Amount
holy, i didnt think of the subtraction. >_< Well thanks bugsys.
|
| All times are GMT -4. The time now is 00:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.