1 decade ago by kbm
Hello everyone,
I have just spent an entire day trying to fix this on my own but I'm hopelessly stuck and need an answer to this very specific issue:
I exported my game from Construct 2 and it works flawlessly with Ejecta, except for one plugin which causes a black screen on startup and an error: the clay.io Plugin
Clay.io is a 3rd party service I use for leaderboards and unfortunately I can not really switch to something else because it's implemented quite deeply into my game.
I get the following error when building the app:
"TypeError: undefined is not an object (evaluating 'tag.parentNode') at Line 17462 in index.js"
This is the code in question:
( 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 );
} )();
The problem seems to be that the tag.parentNode line is undefined, which causes the error. Now when I delete the line in question everything works fine so this seems to be the only issue, but then - also - the entire Plugin stops working.
Can anyone help me out here? I am not a programmer and this is a bit beyond my scope of comprehension :(
I have just spent an entire day trying to fix this on my own but I'm hopelessly stuck and need an answer to this very specific issue:
I exported my game from Construct 2 and it works flawlessly with Ejecta, except for one plugin which causes a black screen on startup and an error: the clay.io Plugin
Clay.io is a 3rd party service I use for leaderboards and unfortunately I can not really switch to something else because it's implemented quite deeply into my game.
I get the following error when building the app:
"TypeError: undefined is not an object (evaluating 'tag.parentNode') at Line 17462 in index.js"
This is the code in question:
( 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 );
} )();
The problem seems to be that the tag.parentNode line is undefined, which causes the error. Now when I delete the line in question everything works fine so this seems to be the only issue, but then - also - the entire Plugin stops working.
Can anyone help me out here? I am not a programmer and this is a bit beyond my scope of comprehension :(