NicMagnier / PlaydateLDtkImporter

Load tilemaps created with LDtk in your playdate games
MIT License
101 stars 15 forks source link

Attempted to index a nul value (local "data") #20

Closed beatmakerofficial closed 11 months ago

beatmakerofficial commented 11 months ago

Yeah, so I'm trying to use this with the default world.ldtk file, and it doesn't give any errors in VSCode, but when I run it in the simulator, it says "Attempt to index a nul value (local data)" and idk what its doing wrong but it says the error is line 105 of LDtk.lua. I tried using toybox.py and it wouldn't let me use ".." in the import path in my main.lua file so I just moved the toyboxes folder into Source, so hopefully thats not why

beatmakerofficial commented 11 months ago

Ok i changed the filepath and it works now but everything is blank

coloal commented 11 months ago

Check you are referencing the .ldtk properly and that the tilemap image is in the same folder as the .ldtk, that was my problem. Then review the .lua files in this repository to view examples of creating the tilemap and drawing it with playdate sdk

NicMagnier commented 11 months ago

@beatmakerofficial do you still have an issue using the importer?

beatmakerofficial commented 11 months ago

Ye I ended up not using it but it was actually because I didn't have the tilemaps created :/