Cannot read properties of undefined (reading "body")

When I play this game, sometimes this error appears Cannot read properties of undefined (reading "body")

Link of the projects:

Do you have any idea how can I fix it?

Make "Enemy hit" global.

@bh, There are some problems, possibly "race condition", for local block (method == undefined) and clones of the dying clone, in

        method = block.isGlobal ? block.definition
                : this.blockReceiver().getMethod(block.semanticSpec),
        context = method?.body,
        declarations = method?.declarations

Thank you so much. It worked.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.