removeBuddy() question

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

Moderators: Lapo, Bax

blindgoatia
Posts: 8
Joined: 02 Jul 2009, 18:29

removeBuddy() question

Postby blindgoatia » 11 Jan 2010, 17:53

When calling removeBuddy(), the buddy Object is deleted but the buddyList Array.length is not updated.

Ex)
buddyList.length = 4
removeBudy("fred");
buddyList.length = 4 but there are only 3 objects in the buddyList Array

Is this meant to be this way? If so, what is the best way to get the number of buddies in your buddyList? It seems rather silly to "for each" them and count them when it's already an array that we could just use the .length property if it was updated on the Object deletion.

Thanks,
blindgoat
-- blindgoat
blindgoatia
Posts: 8
Joined: 02 Jul 2009, 18:29

Postby blindgoatia » 12 Jan 2010, 15:15

I had searched the forums prior to posting, but I didn't see an answer until today.

This answers my question, for anyone interested: http://www.smartfoxserver.com/forums/viewtopic.php?t=6248&postdays=0&postorder=asc&start=0
-- blindgoat

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 27 guests