Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iphonedevelop18

macrumors member
Original poster
Feb 26, 2009
50
0
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.
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
Um, you have your variable assignments backwards. It's:
variableName = expression;

As in:
Code:
 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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.