fill(225, 0, 225);
var draw = function() {
background(255, 255, 255);
ellipse(mouseX, mouseY, 12, 12);
var label = mouseX + "36", "45" + mouseY;
text(label, mouseX, mouseY);
};
I'm creating a small mouse tracker program that calls the coordinates of the mouse pointer just below and to the right of a small circle, using Khan Academy, it's one of their challenges. In particular I'm getting errors when creating the string where I'm attempting to store mouseX and Y along with some coordinates in to the variable 'label'.
You have some funky syntax there, that's not a proper way to use a comma when creating strings. It's not obvious what you really want, but I'm betting something like this:
Which would save a string like
"mouseX:123, mouseY:456"
to the varlabel
.