hello i am making a code for a character that moves on oa background but i keep having the following error
"Badly formed character constant(expecting quote, got E)
If you look at your error box, you will see that the error gives a line number: 40. If you click on the error message it will highlight the error line.
if (key =='LEFT') {
…you can’t put a String in single quotes in Java – it needs to be a char or Character, like ‘L’, or a String in double quotes like “LEFT”. But you don’t want either of those – you want the built-in PConstants keyword LEFT, which is a variable name and so doesn’t appear in quotes at all.