Navigation

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

    Error on wrong line

    Bug Reporting (FUZE 4 Nintendo Switch)
    2
    3
    145
    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.
    • PB____
      PB____ last edited by

      example().notAsStruct = 2
      function example()
      return 1    // error message appears here without any callStack information
      
      // more common scenario (but less clear on what's going on):
      instance = [
          .id = example()
          .name = "whoops"
      ]
      

      I think the code snippet above explains best, but to clarify:

      When you try to access the property of return value of a function that is not a struct, vector or sprite, you will get the correct error message: "Invalid variable access. (Object must be a struct, vector or sprite)"

      However it associates the error with the incorrect line (the return statement of the function in stead of the attempt to access the property of this return statement).

      I think the bottom scenario in my code wouldn't be unique, hence I think this is as a bug (I think other people will run into this)

      While mentioning it, I'd like to add that it would be helpful to have some call stack information, but in general it's already nice to have clear error messages.

      1 Reply Last reply Reply Quote 1
      • Martin
        Martin Fuze Team last edited by

        Thats a known issue already - but thanks for reporting all the same.

        1 Reply Last reply Reply Quote 0
        • PB____
          PB____ last edited by

          Ok, didn't find an existing report of it, good to know that there is awareness :)

          Please note that the title may be misleading. Sometimes you get errors on random lines (I've seen that too). This is different from that. This is a specific and reproducible scenario. (I don't think this is the same bug as https://fuzearena.com/forum/topic/204/error-1180137048/2 for example)

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