1. Hello all,

    I'm working on a mod, part of which needs a list of channel members in a custom chat room.

    So, I figure..

    1. GetChannelDisplayInfo(ChannelIndex)

    2. get the count, for number of players

    3. do a GetChannelRosterInfo() on each player to get the char name.

    But. GetChannelDisplayInfo is returning nil for count, but all other variables are populated correctly.

    local name, header, collapsed, channelNumber, count= GetChannelDisplayInfo(chanIndex);

    and yes, there are plenty of people in the chat room, including myself.

    Any ideas?

    I believe the channel has to be the 'selected' channel in order to obtain any information about it. You may also need to watch for events, such as CHANNEL_COUNT_UPDATE and CHANNEL_ROSTER_UPDATE, but I'm not 100% sure. The default UI works properly, and if you open the chat UI and run /dump GetChannelDisplayInfo(3), which is "General", it works properly.

    (For anyone who's had this problem and comes across this)

    Are you using the channel index given by (type/paste it into the game chat):

    /run for x = 1, GetNumDisplayChannels() do print(x..". "..GetChannelDisplayInfo(x)); end

    or from:

    /run print(GetChannelList());

    There's 2 ways chat channels are numbered in the game.