jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

I cannot change global variables within the draw function #299

Closed Mruek closed 4 years ago

Mruek commented 4 years ago

It is fine when I reference them but when I want to change them I am given an error that seems to think the variable I created outside all the functions is local to the function it is referenced in.

This is the error: processing.app.SketchException: UnboundLocalError: local variable 'score' referenced before assignment

jdf commented 4 years ago

This is a general question about Python, and would be better suited for the Processing forum.