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

Get help using Construct 2

Post » Fri Jun 06, 2014 2:22 pm

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 :/
Last edited by kbm on Fri Jun 06, 2014 4:58 pm, edited 1 time in total.
B
5
S
2
Posts: 29
Reputation: 483

Post » Fri Jun 06, 2014 4:42 pm

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.
B
5
S
2
Posts: 29
Reputation: 483

Post » Fri Jun 06, 2014 5:31 pm

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

clay.src = window['Clay']['PROTOCOL'] + "clay.io/api/api.js";

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:

Code: Select all
( function() {
   var clay = document.createElement( "script" );
        clay.src = ( "https:" == document.location.protocol ? "https://" : "http://" ) + "clay.io/api/api.js";
   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, clay.io doesn't)

EDIT2: Okay, so I have wasted the entire day on this and I'm completely stuck. Unfortunately, clay.io 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.
B
5
S
2
Posts: 29
Reputation: 483

Post » Fri Jun 06, 2014 10:15 pm

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, clay.io as well. If I switched from clay.io 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 clay.io at the moment and would REALLY love to make Ejecta&clay.io 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.
B
5
S
2
Posts: 29
Reputation: 483

Post » Tue Sep 30, 2014 8:26 pm

Hi @kbm , did you figure it out? Tks
B
24
S
4
G
1
Posts: 177
Reputation: 1,827


Return to How do I....?

Who is online

Users browsing this forum: repkino and 5 guests