Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
samofishfire
samofishfire's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Newbie Questions about if(whatever) command
[1 Reply]
23-May-2013 09:36 PM
Forum:
Programming Questions
So I'm new to processing and been trying to teach myself but I'm stuck here:
int CircleX = 0;
int CircleY = 0;
void draw() {
background(255,0,0);
CircleX = CircleX + 1;
CircleY = CircleY + 1;
ellipse(CircleX,CircleY,20,20);
if(CircleX=5);
background(0,0,255);
}
I'm wondering why when I use the if(CircleX=5); it says can not convert from int to Boolean. Does it mean it cannot use the CircleX inside the if(command)? Also I tried putting it outside with it looking like:
int CircleX = 0;
int CircleY = 0;
void draw() {
background(255,0,0);
CircleX = CircleX + 1;
CircleY = CircleY + 1;
ellipse(CircleX,CircleY,20,20);
}
if(CircleX=5) {
background(0,0,255)
}
But then it says looking for EOF found "if". Any ideas for how to get this to work.
Sorry for the beginner question.
«Prev
Next »
Moderate user : samofishfire
Forum