Announcement

Collapse
No announcement yet.

Need Help with MicroTransactions!!!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Thanks man!

    Leave a comment:


  • replied
    This thread should be what you're looking for: http://forums.epicgames.com/threads/...OS-Device-Logs

    Leave a comment:


  • replied
    If the game close due to crash, with no error message, where on the device would I look for the error log file?

    Leave a comment:


  • replied
    I plan to set this up eventually but haven't yet so I'm interested....

    Have you checked the log files on the crash? (probably a dumb question but..)Is it crashing on device or Mobile previewer? Maybe if you placed more `log()s & followed them in the output log file after the crash you'll be able to find out where your code is choking up...?

    Leave a comment:


  • started a topic Need Help with MicroTransactions!!!

    Need Help with MicroTransactions!!!

    Hello!

    I'm so f*king nervous because I'm trying to make the In-App-Purchases work. I have a Kismet node for it, but when I press the "buy" button it crashes the game.
    Here's the code for the kismet node:

    Code:
    class SeqAct_MicroTrans extends SequenceAction;
    
    var MicroTransactionBase MicroTrans;
    var int IsHidden[2];
    var bool isHiddenOne;
    var bool isHiddenTwo;
    
    event Activated()
    {
    
    	OnInit();
    
    	CheckHidden();
    
    	if (InputLinks[0].bHasImpulse) // Refresh
    	{
    		MicroTrans.QueryForAvailablePurchases();
    		CheckHidden();
    	}
    	else if (InputLinks[1].bHasImpulse) // Product 1
    	{
    		MicroTrans.BeginPurchase(0);
    	}
    	 else if (InputLinks[2].bHasImpulse) // Product 2
    	{
    		MicroTrans.BeginPurchase(1);
    	}
    
    	MicroTrans.ClearDelegate(MTD_PurchaseQueryComplete, OnProductQueryComplete);
    	MicroTrans.ClearDelegate(MTD_PurchaseComplete, OnProductPurchaseComplete);
    
    	//PC.SaveVariables();
    	
    	
    }
    
    function OnInit()
    {
    	MicroTrans = class'PlatformInterfaceBase'.static.GetMicroTransactionInterface();
    	MicroTrans.AddDelegate(MTD_PurchaseQueryComplete, OnProductQueryComplete);
    	MicroTrans.AddDelegate(MTD_PurchaseComplete, OnProductPurchaseComplete);	
    }
    
    function CheckHidden()
    {
    	if(isHiddenOne == true)
    	{
    		ActivateOutputLink(0);
    	}
    	if(isHiddenTwo == true)
    	{
    		ActivateOutputLink(0);
    	}
    }
    
    function OnProductQueryComplete(const out PlatformInterfaceDelegateResult Result)
    {
    	local int Index;
    	local PurchaseInfo Info;
    	for (Index = 0; Index < MicroTrans.AvailableProducts.length; Index++)
    	{
    		Info = MicroTrans.AvailableProducts[Index];
    
    		if (Index < 2)
    		{
    			IsHidden[Index] = 0;
    		}
    		
    		isHiddenOne = bool(IsHidden[0]);
    		isHiddenTwo = bool(IsHidden[1]);
    
    		`log("Purchase " $ Index $ ":");
    		`log("  " $ Info.Identifier $ " - " $ Info.DisplayName $ " / " $ Info.DisplayPrice $ " - " $ Info.DisplayDescription);
    	}
    }
    
    function OnProductPurchaseComplete(const out PlatformInterfaceDelegateResult Result)
    {
    	`log("Purchase complete:");
    	`log("  Product = " $ Result.Data.StringValue);	
    	`log("  bSuccess = " $ Result.bSuccessful);	
    	`log("  Result = " $ Result.Data.IntValue);	
    	
    
    	if (Result.Data.IntValue == MTR_Failed)
    	{
    		`log("  Error: " $ MicroTrans.LastError);
    		`log("  Solution: " $ MicroTrans.LastErrorSolution);
    		ActivateOutputLink(2); // Failed
    	}
    
    	else
    	{
    		ActivateOutputLink(1); // Successful
    	}
    }
    
    defaultproperties
    {
    	ObjName="In App Purchases"
    	ObjCategory="Sim"
    
    	InputLinks(0)=(LinkDesc="Refresh")
    	InputLinks(1)=(LinkDesc="Product 1")
    	InputLinks(2)=(LinkDesc="Product 2")
    
    	OutputLinks(0)=(LinkDesc="Hide")
    	OutputLinks(1)=(LinkDesc="Successful")
    	OutputLinks(2)=(LinkDesc="Failure")
    	
    }
    If anybody could help me, or anybody could write a step-by-step tutorial...I swear I'll pay him a lot of money! NO JOKE!
    PLEASE HELP ME!!!!
Working...
X