We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › What am I doing wrong here
Page Index Toggle Pages: 1
What am I doing wrong here? (Read 534 times)
What am I doing wrong here?
Oct 24th, 2009, 3:05pm
 
Why do I get "The left-handed side of the assignment must be a variable"? when i run :

Code:
PImage arch = loadImage ("arch.png");
int count = arch.width * arch.height;
arch.loadPixels();
loadPixels();
for (int i = 0; i < count; 1 += 2) {
pixels[i] = arch.pixels[i];
}

updatePixels();


I hate asking a question like this, but I'm stuck.  Many thanks.
Re: What am I doing wrong here?
Reply #1 - Oct 24th, 2009, 4:17pm
 
there are some other errors then, but in this case the first problem occurs because you wrote 1 += 2...
i guess you ment i+=2 instead.
Re: What am I doing wrong here?
Reply #2 - Oct 24th, 2009, 4:27pm
 
Oh my god.  well, fresh eyes did the trick.  Thanks.

Page Index Toggle Pages: 1