leopard-js / sb-edit

Javascript library for manipulating Scratch project files
MIT License
50 stars 13 forks source link

toLeopard: Handle procedure_calls to missing proc codes #111

Open towerofnix opened 1 year ago

towerofnix commented 1 year ago

Scratch just skips interpreting these blocks - in toLeopard.ts it's currently an error. We should probably report the error in generated code, something like:

if (!procedureDefinition) {
  blockSource = `void undefined; /* ${sprite.name} doesn't have a custom block ${block.inputs.PROCCODE.value} */`;
  break;
}