We are about to switch to a new forum software. Until then we have removed the registration on this forum.
My sketch: http://www.openprocessing.org/sketch/130226 is working in Java mode but not in JavaScript mode. You are supposed to be able to move the coin with the arrow keys. First I thought the key input is not working but after a few tests it appears that the program is frozen. Sadly it's not giving any errors. I found a lot threats with the similar problems but I could not figure out why my sketch is not working.
Answers
In JavaScript, functions are stored in variables. Thus we can't assign them something else lest we lose the function reference:
TypeError: reset is not a function
Thanks for the fast answer :) Sorry, I am a big noob with this stuff. But do I understand right that when I just copy the code of my functions directly into void draw() it might work? They are not really needed anyways I just made em to give it more structure (at least I tried to) or is there a better solution?
I guess it wasn't clear enough:
We can't have variables and functions sharing the same name in JS! (~~)
I am dumb, now I got it. I changed the names but it's still not working #-o Thanks for helping a noob like me out. But I guess I just made more silly mistakes.
I figured it out. #:-S The problem was that in JS "delay();" isn't working. Or at least it is working for me after replacing it :-bd
delay() is to be avoided in Java Processing too! They even removed it for a while...