It looks like you're new here. If you want to get involved, click one of these buttons!
JohnnyAlpha404
Posts: 8Member
Whenever I press O I get the error in my Logcat that says:#pragma strictpublic class Purchase extends MonoBehaviour implementsOuyaSDK.IPurchaseListener,OuyaSDK.IPauseListener,OuyaSDK.IResumeListener,OuyaSDK.IMenuButtonUpListener,OuyaSDK.IMenuAppearingListener{private var input : InputHandlerPattern;private var failed : GameObject;private var canceled : GameObject;private var success : GameObject;public var bought : boolean = false;private var buy : GameObject;private var play : GameObject;function Awake(){OuyaSDK.registerPurchaseListener(this);OuyaSDK.registerMenuButtonUpListener(this);OuyaSDK.registerMenuAppearingListener(this);OuyaSDK.registerPauseListener(this);OuyaSDK.registerResumeListener(this);input = GetComponent("InputHandlerPattern") as InputHandlerPattern;}function Update(){if(input.pressed_A){Application.LoadLevel("game");}if(input.pressed_O){if(!bought){OuyaSDK.requestPurchase("sbt_buy");failed.renderer.enabled = false;canceled.renderer.enabled = false;}else{PlayerPrefs.SetString("restart", "true");Application.LoadLevel("game");}}}function OnDestroy(){OuyaSDK.unregisterPurchaseListener(this);OuyaSDK.unregisterMenuButtonUpListener(this);OuyaSDK.unregisterMenuAppearingListener(this);OuyaSDK.unregisterPauseListener(this);OuyaSDK.unregisterResumeListener(this);}function OuyaPurchaseOnSuccess(product : OuyaSDK.Product){Success();}function OuyaPurchaseOnFailure(errorCode : int, errorMessage : String){failed.renderer.enabled = true;}function OuyaPurchaseOnCancel(){canceled.renderer.enabled = true;}}
Comments
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].