Closed brendanstuff closed 6 years ago
That example doesn't even run, as the function run()
isn't defined, and neither is mouse
, so that NameError can't be thrown. This program works for me:
def setup():
size(400, 400)
def draw():
pass
def mousePressed():
if mouseButton == LEFT:
rect(mouseX - 25, mouseY - 25, 50, 50)
throws us: Uncaught NameError: name 'mouseButton' is not defined on line 11
Came across this doing something my friend challenged me to do (we're both new to coding).