CallJS.ReadExecutionReturn produces an log error

0 favourites
  • 1 posts
From the Asset Store
7 Errors
$15 USD
7 Errors is a game where you have to find the 7 mistakes before time runs out. Can you find all 7? Have fun looking.
  • Hi all, I am doing a project in which I use pure JS, and execute this by using the CallJS plugin. This went okay for one event sheet, but on the other I always get an error in my console log

    [quote:1374n9ny]CHROME: Uncaught TypeError: Cannot call method 'toString' of undefined

    FIREFOX: TypeError: x is undefined

    I have an export on improvive.net/export_quincy

    In the first text field enter the following string:

    33d-j8ZpFFDdr+QQ4RUWxA

    The following is the code that produces the return value:

    var returnstring;
    function retrieveStorylist(){
    input = prompt('Voer hier het unieke gebruikersnummer in');
    $.ajax({
        type:    'GET',
        url:     'http://ihj.improvive.net/view/'+input+'/',
        success: function() {
    	   setting = window.open('http://ihj.improvive.net/view/'+input+'/');
    	   setTimeout(function(){setting.close()}, 1000);
    	  	  $.ajax({
    			type:	'GET',
    			url:	'http://ihj.improvive.net/view/'+input+'/list',
    			xhrFields: {
    				withCredentials: true
    				},
    			success: function(text){
    				if (text === ''){
    					alert('Er is iets fout gegaan .... Meldt dit bij Improvive (Roel, Quincy of Tariq).');
    					exit();
    				}
    				else {
    					/*text = JSON.parse(text);*/
    					numlist = text.length;
    					var inb = {
    						'c2array': true,
    						'size': [text.length, 3, 1],
    						'data': text.map(function(frame){
    							return [
    								[frame.id],
    								[frame.title],
    								[frame.shared]
    							];
    						})
    					};
    				returnstring = JSON.stringify(inb, null, 4);
    						   };
    									},
    								error: function(){
    									alert("Er is iets fout gegaan, controlleer het nummer en probeer het opnieuw");
    									}
    								});
    					}
    	   }
    )
    return returnstring;[/code:1374n9ny]
    
    What goes wrong? :c
    
    (I chose not to include an capx because the event sheet is basically
    ON LAYOUT START: 
    CallJS.Execute("retrieveStorylist()");
    returnvalue = CallJS.ReadExecutionReturn
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)