i'm iterating all the rooms for a lobby view and I want to pull out some custom room variables. I am able to get the room vars if I join the room (some other code does this), but in this case I cant retrieve the room vars.
are the room vars only accessable when in a room?
Code: Select all
NSInteger gameRoomCount = 0;
for (id roomId in [smartFox getAllRooms]) {
INFSmartFoxRoom *room = [[smartFox getAllRooms] objectForKey:roomId];
NSDictionary *vars = [room getVariables];
if ([[[smartFox getAllRooms] objectForKey:roomId] isGame]) {
for(NSString *aKey in vars){
NSLog(aKey);
}
gameRoomCount++;
}
}
return gameRoomCount;