VSCode-Bedrock-Development-Extension icon indicating copy to clipboard operation
VSCode-Bedrock-Development-Extension copied to clipboard

Null Coalescing does not prevent undefined Molang variable error

Open JannisX11 opened this issue 1 year ago • 0 comments

Describe the bug When referencing a Molang variable that has not previously been defined, an error is thrown, even when using null coalescing to handle undefined variables

To Reproduce Steps to reproduce the behavior:

  1. Create a client entity and a linked animation
  2. In the animation, add a Molang expression similar to this: v.width ?? 1
  3. Go back to the entity file
  4. The animation is now marked as faulty with the following error message: The molang variable 'variable.width' is not defined, which should be defined in this '<entity identifier>'

Expected behavior The animation should be valid

Screenshots

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: -
  • Version: v7.0.46

JannisX11 avatar May 29 '24 13:05 JannisX11