leopard-js / sb-edit

Javascript library for manipulating Scratch project files
MIT License
51 stars 14 forks source link

Cannot read properties of undefined (reading 'opcode') #141

Open Administrator95 opened 1 month ago

Administrator95 commented 1 month ago

https://scratch.mit.edu/projects/1025698237/ I was trying to run this project on the website and in NodeJS. However, I keep receiving this error. The only extension it uses is pen and it runs on Scratch 3.0.

towerofnix commented 1 month ago

Thanks for reporting this! We've looked into the things that kept this project from loading and have figured out fixes in pull requests #145 and #146. Once those are both merged, the project should load correctly.

Unfortunately, it doesn't seem to be totally operational. The project runs and the HTML parser appears to be working correctly (probably?) but nothing ends up showing on the screen, except for the grey background. I don't know for sure, but I think the most likely cause is the pen text engine may be using special-characters in its costumes that sb-edit and Leopard don't handle super nicely yet. We are tracking this in #140 but haven't coded a fix yet. If you could write a simple script that tests the behavior of PixelMplus on its own, and doesn't interact with any other modules in your code, that would probably help tell for sure if the text engine is having trouble or if it's something else. (It could be both... But one thing at a time, with debugging... ^^;)