Arrays cannot be assigned values

This forum is currently in read-only mode.
  • Hey guys

    I have a bit of a problem with this cap:

    dl.dropbox.com/u/1378330/002.cap

    Basically, event 43. When the mouse is clicked, the values should be assigned to the array. However, they aren't, and I cannot figure out why. <img src="smileys/smiley19.gif" border="0" align="middle" />

    Knowing me its something ridiculously simple. But if someone else can see where I've gone wrong, I'd really appreciate it. Thanks! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could you post a cap without "external" plugs like magicam?

    Without being able to look at your cap, here's a thought or two. Most of the times when values seem to be missing in the array, one tried to store them at indices that doesn't exist (e.g Array(-1), or, if the size of the array is 10, any index above 10)

    You don't get any error message then, it is just silently ignored.

    Such wrong indices might be due to twisted numbers, calling x with y or the like.

    Make sure, the size of the array is big enough, you don't call any index below 1 and that there are no twisted numbers.

  • Hey Tulamide. Replaced the .cap with on without MagiCam.

    The coordinates, and the global variable to be assigned to those coordinates, all check out in debug mode.

    Woah, woah, woah....

    Let me just check here.

    Are arrays in CC 1-based? Have I been using C2 too much?

    EDIT: Got it working! Had to change it all to a 1-based system and it worked fine.

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