How do I get Ejecta & Clayio to work? Xcode Error

0 favourites
  • 5 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • Hey everyone, I just encountered a bug when exporting my game from Construct with the "Ejecta" Option.

    I loaded the game into Xcode and the clayio plugin seems to crash the app on loading. When I remove the clayio plugin from the project everything works perfectly.

    Things I'm doing with clayio are basically just posting scores and fetching leaderboard objects. I don't understand what I can do now and would love to use clayio since I can use it cross-platform.

    The exact error code in Xcode is: "TypeError: undefined is not an object (evaluating 'tag.parentNode') at Line 17462 in index.js

    I even tried removing all clayio related events and just leaving the plugin and that crashes the app as well. I'm stuck :/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On another note: If this does in fact not work due to a bug, do you guys have any recommendation on what other score system to use?

    My requirement would be that I can post scores and fetch leaderboards WITHOUT the user having to log in somewhere.

  • Maybe this helps: I checked the index.js file and on line 17461 it says the following:

    clay.src = window['Clay']['PROTOCOL'] + "";

    This seems to be the source for the error, right? Unfortunately I know too little about the inner workings of the API to actually do anything about it. Maybe someone else can enlighten me?

    EDIT: Okay, the problem seems to be that the following code produces an error:

    ( function() {
    	var clay = document.createElement( "script" );
            clay.src = ( "https:" == document.location.protocol ? "https://" : "http://" ) + "";
    	var tag = document.getElementsByTagName( "script" )[0]; tag.parentNode.insertBefore( clay, tag );
    } )();
    tag.parentNode seems to produce the error because when I delete just this line, the whole thing works again (but, of course, doesn't)
    EDIT2: Okay, so I have wasted the entire day on this and I'm completely stuck. Unfortunately, integration is a pretty huge deal for me at this point and I REALLY want to make this work. So, if anyone (probably only @Ashley knows something about this?) has the slightest hunch about how to fix this, what is going wrong etc. -> You would make my day, week and probably month, too if you could help me out here. I've googled the crap out of this and NOTHING comes up, nada, niente. Very frustrating.
  • Bump: I know that this is a very specific problem but I've just spent more than 12 hours nonstop on this and can't believe that no one else seems to have encountered this error, it's mindboggling.

    Anyways, another question: I'm committed to using Ejecta and right now, as well. If I switched from Leaderboards to another system this system would need to let me submit scores with both custom name and custom score values WITHOUT asking the user for a login. So far, neither google play nor apple game center integration seems to supply this option, both require a logged in user and only submit a custom score value. For that reason, I'm pretty much stuck with at the moment and would REALLY love to make Ejecta& like each other

    TL;DR I need a combination of Letterbox Scaling, WebGL and a Leaderboard Plugin with custom names and timestamped scores and export possibilites for both Android and iOS. This seems to be impossible as I have encountered bugs in each direction for the past few days.

  • Hi kbm , did you figure it out? Tks

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