Accessing Container Array with function on created

0 favourites
  • 2 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • Link to .capx file (required!):

    Steps to reproduce:

    1. Press T to spawn a new Sprite object, and set that object's container array to the number of times you have pressed T.

    Observed result:

    Error is thrown by the browser, and the value is not set correctly in the object's container array.

    Expected result:

    No Error should be thrown, and the value in the object's container array should equal the number of times you have pressed T.

    Additional Info:

    There are 3 groups of events that I have included

    Group 1(Buggy Version) - Run this to witness the bug.

    Group 2(Buggy Version With Wait) - This uses a wait right before the function call to avoid the bug and achieve intended result.

    Group 3 - This also shows the intended result and shows that using a function call is critical to why this bug happens.

    The error that is thrown is this:

    The page at Iocalhost:50000 says:

    Javascript error!

    Uncaught TypeError Cannot call method set of undefined

    localhost/Arr_plugin.js, line 413 (col 7)

    This is either a bug in Construct 2 or a problem in a third

    party plugin or behavior - please report it to the developer!

    Browsers affected:

    Chrome: yes

    Operating system & service pack: Windows 7 sp 1

    Construct 2 version: 146

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks, good catch - should be fixed in the next build.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)