View Full Version : help with math functions

Mar 2, 2009, 11:55 PM
i have a line of code that goes like this

(priceperacre * Sliderbuy.value) = costbuy;

if ( costbuy < money) {
(costbuy - money) = money;
(Sliderbuy.value + acre) = acre;

it says for the 1st 3rd and 4th lines "invalid Ivalue statement", I assume that those are the wrong ways to command multiply, minus, and plus. So what are the correct math functions to use.

Mar 3, 2009, 12:14 AM
Um, you have your variable assignments backwards. It's:
variableName = expression;

As in:
costbuy = (priceperacre * Sliderbuy.value);

This is pretty basic Objective-C / C / most-other-programming-languages syntax. I suggest you step back and learn those basics before you continue any real programming.