Caveat: I am new to Lua and Playdate
I am using VSCode to edit Lua, and am trying to avoid Lua Diagnostic warnings.
It appears that VSCode depends on
I believe that this uses the Lua LSP.
In my code so far, I have warnings about the following undefined fields:
These are all valid and documented.
I think that the solution is to add them to
Thanks for the report, we do have an open ticket on adding these constants and missing functions. Thanks again.
Is there a resolution for this one?
I'm getting this with the basic tutorial in the Playdate documentation and am unable to get anything running.
These missing stubs won't affect getting things running.
Your screenshot doesn't show all of the code in the example? And of course you'll need to provide your own images for that one.
I've attached the complete code. The console is giving me:
main.lua 12: assertion failed
Hopefully, you're able to point me in the right direction!
Assertion at line 12 basically says "don't go any further if theres nothing in playerImage"
Did you put an image file like a PNG at that location?
It's unrelated to the tooltip thing.
Another, related issue I've found is that the stub file has
function playdate.file.readLine() end. This meant that I got an autocomplete for
readLine, but it should be
There was an image at the location but when I tried a different image it worked. I can only assume the original PNG was corrupted or something!
Anyway, thanks for the direction. It's going to be a while before I release anything if the tooltips are causing me a headache