Socialite (Titan Social)

Socialite (Titan Social)

1M Downloads

Classic anniversary - 'for' limit must be a number

tance77 opened this issue ยท 1 comments

commented

This happens when hovering the social button in the titan bar on classic anniversary.

17x TitanSocial/TitanSocial.lua:362: 'for' limit must be a number
[string "=[C]"]: in function `error'
[string "@TitanSocial/TitanSocial.lua"]:1143: in function <TitanSocial/TitanSocial.lua:1137>
[string "@TitanSocial/TitanSocial.lua"]:1253: in function `TitanPanelSocialButton_OnEnter'
[string "*TitanSocial.xml:17_OnEnter"]:1: in function <[string "*TitanSocial.xml:17_OnEnter"]:1>
commented

Also preset in SoD. Bad fix:

	local guildTotal, guildOnline, guildRemote = GetNumGuildMembers()

	local onlineTable, remoteTable = {}, {}
	local numOnline = split and guildOnline or guildRemote
	
	if numOnline and guildRemote then
		for i = numOnline+1, guildRemote do
			remoteTable[i-numOnline] = i
		end
		for i = 1, numOnline do
			onlineTable[i] = i
		end
	elseif numOnline then
		for i = 1, numOnline do
			onlineTable[i] = i
		end
		remoteTable = {}
	else
		remoteTable = {}
		onlineTable = {}
	end
	
	local function tableDesc(t)
		local desc = "{"
		for i = 1, #t do
			if i ~= 1 then desc = desc .. ", " end
			desc = desc .. (t[i] == nil and "nil" or tostring(t[i]))
		end
		return desc.."}"
	end