[Plugin] Data structures in associative lists

  • It seems to work fine with current C2 versions if you edit the runtime.js a little.

    Search for all occurences of "cr.plugins" and add an underscore, so it'll be "cr.plugins_". I think it just appears four times at the beginning of the file.

    Found it! Thanks bud.

  • I just noticed my "plugin" was being used by some of you guys, so I decided to reupload a working version.

    While at it I decided to add the possibility to use the "set" method to insert data at a non-existing index, by effectively expanding the dataStructure. Empty strings will fill the missing indexes. If the dataStructure is not initialized, it will be created first too.

  • Hi there! I'm using your plugin with my game, but I can't export it properly. The screen is all black, and Chrome's console gives me the following error:

    Uncaught TypeError: Cannot call method 'apply' of undefined

    Here's the link for my game db.tt/OqNHWIv2

    Thanks in advance.

  • So the plugin works in test mode but fails when exported ? Could it have anything to do with a minifying process of any sort ?

  • Yes. Works fine in test mode. But when I export the game, it doesn`t load. All I get is a black screen after loading.

    As a test, i exported other .capx that uses your plugin (found at this topic: scirra.com/forum/eek-slowdown_topic46528.html) And the result is the same.

    Sorry, what did you meant with "minifying"? (Not a native english speaker, sorry the trouble.)

  • When you export a project as a website you have the "Minify script" option activated by default.

    I must have done something which breaks the code when it gets minified. Maybe you could try exporting with the option ticked off to see if it works ?

  • Sure! I can`t check this right now because I`m at work, but as soon as I get home I`ll test it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah ! I'm at work too ! Do you speak french by any chance ? Your name has a french ring to it... I'm a native french speaker, that's what got me wondering.

  • I'm portuguese speaker. But regardless, it's a funny coincidence, because I have plans to start studying french soon!

    I exported my project with the minify option disabled. The result sadly was the same, the screen is black. =/

    Just in case, here's the .capx from my project: db.tt/Az3x0d6G

  • That's sad, I expected it to work. I have no idea what else could be causing this error. We might need help from people more familiar with plugins...

  • I tried to export once again with the minify option disabled, and it worked! db.tt/OqNHWIv2

    Do you have any idea of what can be the problem with the minify option?

  • There are probably rules to follow for the minifier to work. I just searched a little and found this. It shouldn't be too complicated for me to edit the plugin for it to work when minified.

  • Cool! Do you have any plans to update the plugin?

  • Heh, I used "Search and Replace" to replace all occurences of [" by . and all occurences of "] by an empty string. It should work when minified now. Just redownload the link from the first post.

    Please tell me how it goes ! <img src="smileys/smiley2.gif" border="0" align="middle">

  • Tested, and it worked!!! Congratulations friend, and thank you very much for your help!! =)

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