[Resolved] All initialized class variables are nil (Lua)

When creating a class, assigning variables with self.variableName = value in the init function seemingly doesn't work. Any and all variables I attempt to create and modify turn up as nil values.

My main.lua is super simple and is based on the vscode playdate template
image

Any help would be greatly appreciated :sweat_smile:

EDIT: This was because I was doing gfx.sprite:update() instead of gfx.sprite.update() :man_facepalming:
Leaving this up for whoever comes across the same issue

1 Like

Argh! That has got me so many times.

1 Like