We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello. I have to write a game for an essay like class test but now i got stuck. I have errors on every "key" or "keyPressed" and even more because they "don´t exist". Big thanks for every helpful idea.
Answers
If you have questions, just ask.
Showing us the code is more useful than just telling us about the code.
Exact error messages are better than your vague descriptions of errors.
Titles like "help me" are no use to anyone.
Error on "}"
Player 27
I hope that helped.
Test1 is the name of the sketch, I take it?
And you're programming this using the processing ide? Or some other ide, like eclipse?
(Because those errors suggest that the processing pre-processor isn't running, which means you don't get access to all the inbuilt functions like color and key)
Read the tutorial about using processing with eclipse, specifically the bit about multiple classes and passing the parent around.
It if you're using some other IDE, you must have had to use some container class to hold the sketch, right? So you'd have written something like
public class Test1 extends PApplet
.Yes koogs. Test1 is the name of the sketch. I am using the Processing IDE. The strange thing is that in the Test1 tab everything works fine. But not in the other tabs.
ok, in your Test1 tab, hit ctrl-t
you'll see that you've one too many }s meaning that player.update(); is outside a method. that's probably causing all the other errors.
you probably want to delete line 86
ctrl-t is your friend here. properly indented code makes the sructure easier to see.
or maybe delete line 80. it's a tossup as to which bracket is wrong.Thank you koogs. I found it. Now i have to look for the "could not run the sketch (target vm failed to initialize)" error.
after fixing that, then this is the next problem
because wand.length = 0 and wand[-1] throws an error.
god, i hate debugging fullscreen programs - when they fail they leave behind a screen that you can't close and that gets in the way of accessing everything else.
I will fix it. Thank you. Yes, I just turned the fullscreen off too.
in my experience the above is intermittent and usually not something wrong with the sketch. often it'll go away if you just rerun it