hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    0 (zero) in the first cell of an array doesn't initialise

    Scheduled Pinned Locked Moved
    Can't Reproduce / Expired
    5
    14
    602
    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.
    • iTap DevelopmentI
      iTap Development @Deeeds
      last edited by iTap Development

      @Deeeds you can go to this link to get back your hour. https://www.hyperpad.com/gettimeback
      Just fill out the form, and you’ll get it back within 3 business days.
      Or you could ask Santa for it🎅

      1 Reply Last reply Reply Quote 0
      • Jack8680J
        Jack8680 @Deeeds
        last edited by

        @Deeeds I can't reproduce this. Setting an array to [0,"1"] from json, or using an array behaviour and setting the values to 0 and 1, or anything else I can think of work fine.

        The only thing that returns a null value for me is accessing an index out of bounds or manually creating an array such as [,"1"] from json.

        How are you initialising the array and what is returning a null value?

        D 1 Reply Last reply Reply Quote 0
        • D
          Deeeds @Jack8680
          last edited by

          @Jack8680

          Creating an array and manually placing a zero in the first cell (first index location) doesn't initialise the array.

          Somehow you're doing everything that is not this:

          0_1514001506986_JACKImage-1.jpg

          Jack8680J 1 Reply Last reply Reply Quote 0
          • Jack8680J
            Jack8680 @Deeeds
            last edited by

            @Deeeds this array works normally for me. I can get the array value at index 0 and it returns 0. In json form the array shows as ["0"]; it's treating the 0 as a string,

            Here's a screenshot:
            0_1514019553769_IMG_0655.PNG

            The text input returns the get array value output and the json form of the array.

            D 2 Replies Last reply Reply Quote 0
            • D
              Deeeds @Jack8680
              last edited by

              @Jack8680 Same exact thing, I get <null>

              1 Reply Last reply Reply Quote 0
              • D
                Deeeds @Jack8680
                last edited by

                @Jack8680 I've found a solution to part of this, that I only casually observed in the first part of this post, setting that first indexed item to something other than 0, and then back to zero.

                Having done that, it's found and initialised the array and I can use 0 in that location.

                But the first time, each time, 0 isn't working.

                I've also found that the first time I attempt to access an array with a new Get Value from Array behaviour, I need to restart hyperPad before it will work at all. Before the restart it's as though it cannot find the array.

                It could simply be that constantly overwhelming the cocos2D drawing of hyperPad behaviours causes all sorts of interesting issues with everything in hyperPad, but I'm only noticing it within arrays because that's what I'm using most of the time, for most everything.

                Force quitting and then restarting hyperPad has become my new normal.

                When that's no longer beneficial and performance really degrades, I hard restart the iPad and get a solid boost back to 60fps.

                1 Reply Last reply Reply Quote 0
                • HamedH
                  Hamed Admin
                  last edited by

                  This is working fine for me as well. Could it be that you're not actually setting it back to zero?

                  0_1514212727773_Screen Shot 2017-12-25 at 9.37.48 AM.png

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    Deeeds @Hamed
                    last edited by

                    @Hamed In the first screen shot I've shown in this thread, I'm manually creating the array, and manually creating a cell, then entering zero in the first cell.

                    The first time I try to access this array, in any way, it's returning null.

                    On some attempts to access existing and populated arrays, I'm also getting null returns.

                    The only fix, for me, is to restart hyperPad, then the exact same code, untouched, begins to operate correctly.

                    This is much the same as the thread on negative numbers not working in an array. These are issues that seem to be happening as a result of the extended durations of my usage of hyperPad. I am often working in it for a few hours at a time, fiddling with graphics and physics settings, adding new functionality and game features, and then figuring out something I want to do with an array, at which point these things happen that are very weird.

                    Jack8680J 1 Reply Last reply Reply Quote 0
                    • Jack8680J
                      Jack8680 @Deeeds
                      last edited by

                      @Deeeds so doing the following returns <null> in your text input?

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        Deeeds @Jack8680
                        last edited by

                        @Jack8680 Not in a new project, and not in a new work session.

                        But after a while, yes.

                        And... all other newly created access to ALL pre-existing arrays will also return null, once that problem starts occurring.

                        And all sorts of other issues rear up and become a nightmare of uncertainty, too.

                        There is a cumulative degradation in the way hyperPad operates, this is one of those.

                        The first time I saw this was the weirdness in the report regarding negative numbers in arrays.

                        As previously noted, restarting hyperPad, and the iPad, clears this up, and many other undesired or otherwise wrong activity.

                        As also previously noted, I'm mostly noticing these degradations and gibberish in Arrays, but have also seen it with conditionals.

                        Jack8680J 1 Reply Last reply Reply Quote 0
                        • Jack8680J
                          Jack8680 @Deeeds
                          last edited by Jack8680

                          @Deeeds it's weird that you're getting all these bugs; I don't think I've ever had a bug in a game that was fixed by restarting hyperPad, other than visual bugs in the editor. Is your device jailbroken?

                          D 1 Reply Last reply Reply Quote 0
                          • D
                            Deeeds @Jack8680
                            last edited by

                            @Jack8680 No, not jailbroken.

                            But my project is large. Build times are anywhere from 10 seconds to 20 seconds, which is much longer than it was...

                            I've just pruned it... gotten rid of all of the iterative "scenes", and still having problems.

                            1 Reply Last reply Reply Quote 0
                            • T
                              Thecheater887
                              last edited by

                              You should try reinstalling, in a.l honesty.

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