Navigation

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

    object handle in structure doesn't work with 3D functions

    Bug Reporting (FUZE 4 Nintendo Switch)
    6
    17
    587
    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.
    • Jongjungbu
      Jongjungbu F last edited by Jongjungbu

      I do not have this problem, but I use mostly objects that I’ve loaded from 3D models that is. I don’t have any dynamically created objects inside structs, only outside them. But I do rotate and move these loaded objects whose handle I’ve placed inside structs. Just some extra info to help you guys narrow down the bug.

      1 Reply Last reply Reply Quote 0
      • pico8-jihem
        pico8-jihem F last edited by

        @Jongjungbu If you store the handle (provided by placeObject) in a "classic" variable rather than in a field of a structure it works.

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

          Hmm.. I have written this exact same code out and had no error, just rotating the cube as expected.

          Can anyone else reproduce this?

          pianofire 1 Reply Last reply Reply Quote 0
          • pianofire
            pianofire Fuze Team @Dave last edited by

            @Dave Just checking Dave are you on the release or the patch?

            1 Reply Last reply Reply Quote 0
            • Dave
              Dave Fuze Team last edited by

              Release. I did double check!

              pianofire 1 Reply Last reply Reply Quote 0
              • pianofire
                pianofire Fuze Team @Dave last edited by

                @Dave Sorry for doubting!

                1 Reply Last reply Reply Quote 0
                • Dave
                  Dave Fuze Team last edited by

                  @pianofire You were very right to ask!!

                  1 Reply Last reply Reply Quote 0
                  • Jongjungbu
                    Jongjungbu F last edited by

                    I just replaced my NPCs with cubes in my WIP demo and no issue...

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

                      @pico8-jihem Hate to be this guy dude but would you mind double checking your code again? I've written it out exactly as you wrote here with no issue.

                      1 Reply Last reply Reply Quote 0
                      • pico8-jihem
                        pico8-jihem F last edited by pico8-jihem

                        You're welcome. You can find the screen captures below...
                        http://codyssea.com/downloads/f4ns/20190904-001.jpg -- works (without struct)
                        http://codyssea.com/downloads/f4ns/20190904-002.jpg -- fails (with struct)
                        http://codyssea.com/downloads/f4ns/20190904-003.jpg -- the error message

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

                          Is "handle" a valid struct type?

                          1 Reply Last reply Reply Quote 0
                          • Jongjungbu
                            Jongjungbu F last edited by Jongjungbu

                            It is a valid type. The code he posted in the original post is slightly different than the screenshots.

                            The original post will work but the screencaps don’t, from my own testing. It appears to be an issue with making multidimensional arrays of structures.

                            So if you take lvl[7][7] and simply shrink it to lvl[7] then it works. That extra dimension from what I see is where it is breaking.

                            So it’s not that it doesn’t work outright per the topic title, as I use a single array of structures that I pass around for objects.

                            1 Reply Last reply Reply Quote 0
                            • pico8-jihem
                              pico8-jihem F last edited by pico8-jihem

                              @Jongjungbu You are right. With a dimension, it works. If you replace "handle obj" with "int obj" in the struct block, it works with lvl [7] [7] ...
                              Thank you for your help. I hope it will work as expected sooner or later with a patch.

                              I agree, this seems to be more related to array of structures than 3D functions.

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

                                This got very confusing very quickly. The problem being two fold.

                                The array type has a known bug - especially with multiple dimension arrays
                                The second being FUZE is very loosely typed - and populating typed vars with other values seems to cause unexpected results!

                                We will look into this. Thanks for pointing it out @pico8-jihem and thanks to everyone else for investigating/ helping.

                                1 Reply Last reply Reply Quote 0
                                • Jongjungbu
                                  Jongjungbu F last edited by

                                  Gotta give @pico8-jihem props for pushing the envelope. Better to find these issues out sooner than later 😄

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