Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Multi dimensional array index bug

    Bug Reporting (FUZE 4 Nintendo Switch)
    3
    3
    179
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sys64738
      sys64738 F last edited by sys64738

      Not at all an expert on these but the inconsistancy makes me think it is a bug.

      array zig[3]
      zig[3] = 6

      Creates an array of 4 integers. 0,1,2,3

      With multi dimension it only creates 3 integers 0,1,2
      array zig[3][0]
      zig[3][0] = 6

      Error "Attempted to index non-array type"

      If I create 4. I now have access to 3. Following code works

      array zig[4][0]
      zig[3][0] = 6

      1 Reply Last reply Reply Quote 0
      • M
        MikeDX last edited by

        Part of me thinks the first bit is a bug and part of me thinks the second part is the bug

        array[5] should be 0-4, no question

        Someone will know the answer to this in the office. I'll try to find out!

        1 Reply Last reply Reply Quote 1
        • Discostew
          Discostew F last edited by

          To be honest, the whole assigning 0 to a dimension on creation just confuses me. It's one thing to use 0 when reading/writing to an array because of it being base-0, but on creation, it's base-1, as using 0 I would think would cause it to make a non-element array. There's the whole array-expansion bit by assigning data to an out-of-bounds element though.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post