Sprites and Lovyangfx

After a while I compiled on old program (4 months old) anf found that the sprites are not working.

static LGFX lcd; 
static LGFX_Sprite sprite(&lcd);

WiFiUDP udp;


//sprite balk
sprite.createSprite(480,20); 

When I compiled it got the error

/Users/jankromhout/Documents/Arduino/read_udp_message/read_udp_message.ino:21:1: error: 'sprite' does not name a type
 sprite.createSprite(480,20);

What is wrong with my code?

There are only 4 lines and none are in setup() or loop()

Edit: grammar

Your function call sprite.createSprite(480,20);needs to be inside a function. See further previous comment in post #2.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.