Accessing Container Array with function on created

Bugs will be moved here once resolved.

Post » Tue Oct 08, 2013 5:01 am

Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/172444/Container_UponObjectCreation.capx

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
http://localhost:50000/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
B
5
S
1
Posts: 11
Reputation: 420

Post » Thu Oct 10, 2013 12:57 pm

Thanks, good catch - should be fixed in the next build.
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests