Page 1 of 1

removeBuddy() question

Posted: 11 Jan 2010, 17:53
by blindgoatia
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

Posted: 12 Jan 2010, 15:15
by blindgoatia
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