Chat bubble database error

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Re: Chat bubble database error

Postby zachofthegolden1 » 19 Jan 2013, 14:12

Thats the point. I edited the avatar chat and the only thing i changed was frame 9 which i posted in this tpic earlier. it does seem to have trouble accessing the clients avatar i mean with admin badges i have to set it to myAvatar for it to even show. This is confusing me big time lol

Could you send me the avatar chat you edited so i can compare codes please? because i think it must be something ive edited in frama 9 or 16 causing this error thanks :)
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Chat bubble database error

Postby rjgtav » 19 Jan 2013, 22:53

Sure. I've added it as an attachment, alongside with the extension used for handling the customLogin, so anyone can access it in the future.
Attachments
avatarChat customLogin.zip
(137.36 KiB) Downloaded 631 times
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Re: Chat bubble database error

Postby zachofthegolden1 » 19 Jan 2013, 23:42

was simple chat custom login set from false to true? its the same as my code but do i have to have another custom login extension? i mean i use one for the db to login and well my code is pretty much the same as yours
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Chat bubble database error

Postby rjgtav » 20 Jan 2013, 00:02

Yeah, it was set to true. That was just as an example. You can try connecting that avatarChat fla I uploaded with your extension. Just make sure that you send the same info as I do, like the userId and the userName.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Re: Chat bubble database error

Postby zachofthegolden1 » 30 Jan 2013, 07:39

i cant seem to get around it i mean with ym custom login extension i am using the one from your tutorial site. Maybe its something in there causing it
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Chat bubble database error

Postby rjgtav » 31 Jan 2013, 00:04

Please make sure that you're sending the new username and userId alongside with the logOK response, when a login is successful.
And then you populate the smartfox.myUserName and smartfox.myUserId with those values.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Re: Chat bubble database error

Postby zachofthegolden1 » 01 Feb 2013, 02:33

inside my swf

Code: Select all

smartfox.myUserName = resObj.name;
  smartfox.myUserId = resObj.id; //not sure if it is resObj.id




My serverside extension

Code: Select all

response.id = user.getUserId();
       response.name = user.getName();



Thie problem still persists
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Chat bubble database error

Postby rjgtav » 01 Feb 2013, 21:49

I'm sorry but if the problem still persists, then there is a problem on your code.
If it doesn't show the bubble, it's because it isn't being able to access the current client's avatar.
I suggest you to debug your code, see what is preventing it from accessing the avatar. As you can see the default avatarChat example works fine with the custom login feature, so the problem is somewhere else.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Re: Chat bubble database error

Postby zachofthegolden1 » 05 Feb 2013, 12:39

For soem reason it wont use the data from frame 9 onto fraame 16 so the only hing that works is coins and moderator so smartfox.myUserId and smartfox.myUserName dont seem to work on frama 16 but on frame 9 in ym traces it shows the username and id but for some reason it wont carry those onto the chat frame even on the one that you posted. i would poast my whole extension source but i dont want people copying and pasting it as its got seneitive info in there
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Chat bubble database error

Postby rjgtav » 09 Feb 2013, 00:10

Hi,

Are you sure that you only gotoAndStop() to the last frame after setting the variables on the previous frame?
On the avatarChat example i've posted it was working fine. Can you test it with your extension?

Thanks
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Re: Chat bubble database error

Postby zachofthegolden1 » 25 Feb 2013, 01:11

Problem fixed i basically copied all the code from rjgtav's version then edited the responses to the one in his custom login redid al my custom stuff in my swf and it worked thank you :)
-ZG1
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Chat bubble database error

Postby rjgtav » 25 Feb 2013, 22:53

Great! :)
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 78 guests