acbaltaci's Forum Posts

  • 4 posts
  • I am new to community, sorry for misleading. As Ashley said and zenox98 warned again, i strongly recommend to not make this change unless you are doing this just for fun as i do... Also maybe Ashley can check if this fix is worth to do it or not..

    Before calling onFBLogin() you look for fbUserID.. On cases which user close browser and re-open again somehow session is still alive but you are not authorized by facebook api.. On this cases you will get response.authResponse is null error.. To avoid this error you can try to modify runtime.js as below (starting line 114)..

    I am still using the free edition, maybe personal editions dont have this issue..

           FB.Event.subscribe('auth.login', function(response) {
                 if(response["authResponse"]){ // Check if response.authResponse exists
    				fbUserID = response["authResponse"]["userID"];
    				log("User ID = " + fbUserID);
    				onFBLogin();
                  } // close if
    	});
    [/code:q0faifuw]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Modify Plugin to check if response["authResponse"] exists...

  • Hey rexrainbow,

    Exp is better idea to return a value i agree..

    On the other hand, On button's click event i want to run an Action. And i want to run it only 1 time instead of forever....

    There must be a trick to run these actions only 1 time

  • Hi There,

    I am new to Construct2 Community.

    I am trying to achieve to create a plugin which is just do a simple math, alert result and return result to game like adding it to an array or to a textbox.

    edittime.js : 
    
    AddNumberParam("1st Number", "description bla bla");
    AddStringParam("2nd Number", "desc bla bla");
    AddAction(0, af_none, "Do Sum", "SUMZZ", "SUMZZ", "num1 + num2 .....", "DoMath");
    [/code:2lyjtg1k]
    
    [code:2lyjtg1k]
    runtime.js : 
    
    Acts.prototype.DoMath = function (numa,numb)
    	{
    		var total = numa+numb;
    		alert(total);
    		//return total; actualy right now i dont have any idea how to return...
    	};
    [/code:2lyjtg1k]
    
    I added a button to layout and when you click to button i expect see a single alert.. But when i click to button, it keeps showing same alert window non-stop..
    
    Isnt there a way to run these actions once for every click ?
  • 4 posts