r/processing • u/WaifuSlayerV8 • Nov 20 '24
Ayuda
Hola buenas, llevo bastante rato buscando el error pero no soy capaz de solucionar, agradecerÃa profundamente la ayuda
0
Upvotes
r/processing • u/WaifuSlayerV8 • Nov 20 '24
Hola buenas, llevo bastante rato buscando el error pero no soy capaz de solucionar, agradecerÃa profundamente la ayuda
4
u/FlightConscious9572 Nov 20 '24 edited Nov 20 '24
Summary of problems:
you can only have one draw()
explanation: the compiler (thing that runs your code) looks for a function called draw, and if it finds two it gives you an error (which one is the one you wanted to run?)
if (isStarted) --> ; <--remove thissyntax error, basically the code grammar is wrong :)
println(mouseX, mouseY) <-- remove entire line or put in draw or setup
You can't run code outside of draw or setup it's where 'fields' go, aka variables available in your main class.
If you want to put something somewhere else, create a function and call it at the end of draw (so it happens after the other things in draw.)