Forum QuickConnect Missing game id

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

Missing game id

Postby cogloch » February 5th, 2013, 10:35 pm

I've tried both simpleRegister and simpleConnect, and both return Error #2032: Stream Error. URL: http://api.playerio.com/api/403, missing game id. But the game id is there, I triple checked it, and it's there. I've uploaded the serverside code so I don't think that's the problem. If it's any relevant I'm using starling, therefore I don't have direct access to the native stage. Any help?
cogloch
 
Posts: 11
Joined: November 8th, 2012, 10:34 pm

Re: Missing game id

Postby ASH1138 » February 6th, 2013, 9:06 am

cogloch wrote:I've tried both simpleRegister and simpleConnect, and both return Error #2032: Stream Error. URL: http://api.playerio.com/api/403, missing game id. But the game id is there, I triple checked it, and it's there. I've uploaded the serverside code so I don't think that's the problem. If it's any relevant I'm using starling, therefore I don't have direct access to the native stage. Any help?

I've encountered a similar problem.

You cant use starling for your game menu. You must run your staling stage for games only on top of your flash stage.

I think you must rebuild everything on the game menu page. :)
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: Missing game id

Postby Benjaminsen » February 6th, 2013, 10:49 am

cogloch wrote:I've tried both simpleRegister and simpleConnect, and both return Error #2032: Stream Error. URL: http://api.playerio.com/api/403, missing game id. But the game id is there, I triple checked it, and it's there. I've uploaded the serverside code so I don't think that's the problem. If it's any relevant I'm using starling, therefore I don't have direct access to the native stage. Any help?


Post some code :)
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Missing game id

Postby cogloch » February 6th, 2013, 8:09 pm

ASH1138 wrote:I think you must rebuild everything on the game menu page.

Wait what. I'm using feathers so you figure. It would be a real pain in the butt to miss the deadline for the damn menus. :roll:

Benjaminsen wrote:Post some code :)


Everything's in place. Using the native stage property gets me past the "Implicit coercion..." but that's where it ends.
Code: Select all
PlayerIO.quickConnect.simpleRegister(
Starling.current.nativeStage,
"secret for whatever reason",
_user.text,
_pass.text,
_email.text,
null,
null,
{faction: _faction},
null,
function(client:Client):void{
      trace("Yay");                                                                
},function(e:PlayerIOError):void{
      trace("Got", e) //Error #2032: Stream Error. URL: http://api.playerio.com/api/403
});
cogloch
 
Posts: 11
Joined: November 8th, 2012, 10:34 pm

Re: Missing game id

Postby ASH1138 » February 9th, 2013, 8:00 am

aha. I solved your problem.
native stage refers to the stage3D vector stage overlay and not the real flash stage.

Place the connect code on a movieclip class, add it to the stage and then call connect(root.stage), will solve it.


If you appreciate my help, please send me a copy of your RTS game so that i can play it. :P
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: Missing game id

Postby cogloch » February 10th, 2013, 7:52 pm

ASH1138 wrote:aha. I solved your problem.
native stage refers to the stage3D vector stage overlay and not the real flash stage.

Place the connect code on a movieclip class, add it to the stage and then call connect(root.stage), will solve it.

Code: Select all
public class Login extends flash.display.MovieClip
{
public function attemptLogin():void
      {
         PlayerIO.quickConnect.simpleConnect(
            root.stage,
            //...
         );
      }
}

Code: Select all
public class Main extends starling.display.Sprite
{
var _login:Login = new Login();
Starling.current.nativeOverlay.addChild(_login); //if I do simply addChild(_login) then I get e 1067: Implicit coercion...
_login.attemptLogin(); //same thing
}

So that doesn't work either, or maybe I'm doing something wrong. Please tell me it's the second one. :)
cogloch
 
Posts: 11
Joined: November 8th, 2012, 10:34 pm

Re: Missing game id

Postby ASH1138 » February 11th, 2013, 8:59 am

cogloch wrote:
ASH1138 wrote:aha. I solved your problem.
native stage refers to the stage3D vector stage overlay and not the real flash stage.

Place the connect code on a movieclip class, add it to the stage and then call connect(root.stage), will solve it.

Code: Select all
public class Login extends flash.display.MovieClip
{
public function attemptLogin():void
      {
         PlayerIO.quickConnect.simpleConnect(
            root.stage,
            //...
         );
      }
}

Code: Select all
public class Main extends starling.display.Sprite
{
var _login:Login = new Login();
Starling.current.nativeOverlay.addChild(_login); //if I do simply addChild(_login) then I get e 1067: Implicit coercion...
_login.attemptLogin(); //same thing
}

So that doesn't work either, or maybe I'm doing something wrong. Please tell me it's the second one. :)


Neither. the connect function MUST be on a FLASH.DISPLAY.STAGE not a STARLING.NATIVEOVERLAY. ;)
please put the code on the flash stage. i dont know how feathers work, but why are you using it for your game menu especially when the perfromance of the menu is never important? ;)
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: Missing game id

Postby cogloch » February 11th, 2013, 1:46 pm

ASH1138 wrote:i dont know how feathers work, but why are you using it for your game menu especially when the perfromance of the menu is never important? ;)


I thought that if I use starling, then I'm going to use it till the end, and since feathers handles uis really well, why not. Plus I don't want to touch flash pro, I'm doing it code only all the way. I've tried a few workarounds, with no success so I'll just drop it 7 days before the deadline. :roll:
cogloch
 
Posts: 11
Joined: November 8th, 2012, 10:34 pm


Return to QuickConnect