The reason why the code is erroring is that GetChannelList() now returns 3 values per channel rather than 2. Also changed to a recursive style, adding another if statement with a modulus comparison seemed ugly. And I don't think anything is wrong with the SetText code, it just never got executed because it happens after the error trying to initialize the dropdown menu. Just replace the original ChannelsMenu_Initialize with this one and you should be good to go.
Lua Code:
function ChannelsMenu_Initialize()
local function AddChannelsRecursively(id, name, disabled, ...)
local title = id .. ". " .. name;
ShowDebug("Found channel " .. title);
local info = UIDropDownMenu_CreateInfo();
info.text = title;
info.value = id;
info.owner = ChannelsDropdown;
info.func = OnChannelsMenuClick;
UIDropDownMenu_AddButton(info);
if ... then return AddChannelsRecursively(...) end
end
AddChannelsRecursively(GetChannelList());
end