Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classic anniversary - 'for' limit must be a number #49

Open
tance77 opened this issue Dec 1, 2024 · 1 comment
Open

Classic anniversary - 'for' limit must be a number #49

tance77 opened this issue Dec 1, 2024 · 1 comment

Comments

@tance77
Copy link

tance77 commented Dec 1, 2024

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>
@isitLoVe
Copy link

isitLoVe commented Dec 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants