Forum ActionScript 3.0 Problem with client.gameRequests.showSendDialog

Problems and discussions relating to ActionScript 3.0 here.

Problem with client.gameRequests.showSendDialog

Postby kisushka_edition » August 13th, 2015, 8:43 am

My code is:
Code: Select all
try {
   r.showSendDialog('invite', {
      content : '123',
      source : '123'
   }, callback);
} catch (e) {
   log(e);
}

i have a pending request:
http://prntscr.com/842m1v

and i have an error:
Code: Select all
ReferenceError: Error #1065

i didn't find anything about the second parameter except this:
http://prntscr.com/842nf3
https://gamesnet.yahoo.net/documentation/services/gamerequests/
what am i doing wrong?
kisushka_edition
 
Posts: 5
Joined: February 26th, 2015, 7:55 am

Re: Problem with client.gameRequests.showSendDialog

Postby Henrik » August 14th, 2015, 12:03 am

That it's pending shouldn't make any difference, you should still be able to get the request dialog to show. You can also leave the payload empty, that's meant for you to put whatever data in that you want, and then you can retrieve it when you handle received gamerequests.

Do you ever see the dialog, or does that method just throw an error immediately?

What happens if you try to call the send method directly, and send it to another user?
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: Problem with client.gameRequests.showSendDialog

Postby kisushka_edition » August 14th, 2015, 8:06 am

I receive the error immediatelly after calling the function, without getting a dialog.
kisushka_edition
 
Posts: 5
Joined: February 26th, 2015, 7:55 am

Re: Problem with client.gameRequests.showSendDialog

Postby kisushka_edition » August 14th, 2015, 8:19 am

And one stupid question... How can i add friends in yahoo?))

----

i tried to call client.yahoo.relations.showFriendsManager and it had the same error...

----

i can open the payment dialog, but i can't open showFriendsManager and showSendDialog

as soon as i can i will check gameRequests.send
kisushka_edition
 
Posts: 5
Joined: February 26th, 2015, 7:55 am

Re: Problem with client.gameRequests.showSendDialog

Postby Henrik » August 14th, 2015, 7:19 pm

So if you can open the payments dialog, I assume your game is on a webpage where you've integrated the Yahoo Canvas properly.

You should be able to open the friends dialog trough javascript on the page:

YahooGames.dialog('friendsmanager', {});

Does that work?
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: Problem with client.gameRequests.showSendDialog

Postby kisushka_edition » August 17th, 2015, 7:26 am

Something happened:
http://prntscr.com/85izgp
kisushka_edition
 
Posts: 5
Joined: February 26th, 2015, 7:55 am

Re: Problem with client.gameRequests.showSendDialog

Postby Henrik » August 17th, 2015, 5:47 pm

Did you initialize the YahooGames JS properly on that page? You need to set window.YahooGamesSetup:

https://gamesnet.yahoo.net/documentation/yahoo/canvas
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: Problem with client.gameRequests.showSendDialog

Postby kisushka_edition » August 18th, 2015, 3:50 pm

http://prntscr.com/861zvz works;
PlayerIO.authenticate seems to work fine too;

And i think it would be strange if i can make payments without it.

-------------------------------------------------------------------------------

Somehow i managed to call friendsmanager window from js.
Now it seems obviously that the problem is either in flash or in PlayerIO.swc.

-------------------------------------------------------------------------------

Everything works from js. It seems i should use only Authenticate function from PlayerIO, and others from js.
But i'm still interested in reasons of the problem.
kisushka_edition
 
Posts: 5
Joined: February 26th, 2015, 7:55 am


Return to ActionScript 3.0