NoMod-Programming / Whiskers

Whiskers, a NuScratch modification made to resemble Scratch 2.0
https://scratch.mit.edu/discuss/topic/157672/
16 stars 2 forks source link

Projects with custom blocks don't load #4

Closed ivanov closed 7 years ago

ivanov commented 7 years ago

First, thank you for taking the time to make Whiskers!

This might be an issue with how they are saved, but custom blocks cause an error on project load.

In ScriptableScratchMorph CustomBlockFromTuple - on this line

    ifFalse: [t3 := {t1 second. t1 first = #callReporter

the variables are

t1:     #('call')
t2:     a ScratchSpriteMorph(3251934)
t3-t9: nil

So the t1 second. portion causes a "Subscript is out of bounds: 2" error

The way to reproduce this is to make a custom block AND use at least one of the custom blocks in the sprite code. (having a custom block defined but not used seems to not cause the error)

NoMod-Programming commented 7 years ago

Well, this is embarassing. I misspelled "asBlockTuple" in the source code. I'll go ahead and release a version that fixes this, but looking at the source, because of that misspelling, custom blocks didn't save correctly. If you want, I can make Whiskers load the file, but the custom blocks will need to be re-created (Just the blocks that call them). Let me know if you want this.

ivanov commented 7 years ago

Oh, glad you found the bug! I don't need a workaround for files saved with version of Whiskers that had the bug, so no need to bother with that if that makes cutting a new release easier for you.

NoMod-Programming commented 7 years ago

Fixed in 0.9a6