better error message when (getCollectedBlocks) fails

This commit is contained in:
2023-07-08 15:06:55 -06:00
parent d719351299
commit 034e83827c

View File

@@ -1088,6 +1088,8 @@ class Macros {
};
k.macroVars["getCollectedExps"] = function(blockName) {
if (!k.collectedBlocks.exists(blockName))
throw 'no blocks for $blockName were collected. Try adding (collectBlocks ${blockName}) at the start of the file.';
return k.collectedBlocks[blockName];
};