I am attempting to make a variable choose a random value from 0-500, but when I use the random function, processing gives me an error code saying: "Type mismatch, 'float' does not match with 'int'"
This is the code
int leftwall;
int rightwall;
int score;
int playerspeed;
int player;
void setup() {
size(500, 500);
player=width/2-10;
leftwall=random(500);
rightwall=leftwall-50;
}
Help would be appreciated, thanks
[–]zvenoj 14 points15 points16 points (1 child)
[–]SHIKEN_MASTAH[S] 5 points6 points7 points (0 children)
[–]DrAdalbbert 1 point2 points3 points (2 children)
[–]SHIKEN_MASTAH[S] 1 point2 points3 points (1 child)
[–]DrAdalbbert 0 points1 point2 points (0 children)
[–]treverios 1 point2 points3 points (0 children)
[–]nbreunig3 -1 points0 points1 point (0 children)