Re: Negative Money [message #351942 is a reply to message #351924] |
Wed, 24 September 2008 03:40 |
Adad
Messages: 84 Registered: April 2003
Karma:
|
Recruit |
|
|
Stewie wrote on Wed, 24 September 2008 13:33 |
insert_name_here wrote on Tue, 23 September 2008 08:44 | IF X < Y
Then X = 0
ELSE
X = X - Y
Well...wouldn't it be as simple as something like that?
|
Well..
if (money < cost) { return 2; } // Insufficient Funds
else { return 0; } // Allow
But yes, that's exactly the problem. Westwood didn't think we'd ever have negative money. But I still have to find the location that rejects it. Haven't so far!
|
In VendorClass::Purchase_* functions.
|
|
|