Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-145798

"isNaN" not working in GameTest framework

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 1.17.40, 1.18.10
    • None
    • Confirmed
    • Android
    • 819230

      For some odd reason, the function "isNaN" no longer works in GameTest scripts as of 1.17.40. It always returns false, even the value passed in is `NaN`.

      Steps to Reproduce:

      1. Make a behaviour pack with a Gametest script that does the followings (Updated for 1.18.10):
        world.getDimension('overworld').runCommand(`say ${isNaN(NaN)}`);
      1. Import the pack to a world (Gametest framework enabled) and run it.

        
      Observed Results:

      Chat says

      false

      Expected Results:

      Chat should say

      true

       

      Notes:

      Fortunately this can worked around by comparing the value to itself, but it would be great if a common function such as this works as intended.

            SIsilicon Roujel Williams
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: