RCLootCouncil

RCLootCouncil

23M Downloads

/rc add all command (WotLK)

fgsfdss opened this issue ยท 13 comments

commented

Sometimes, when attempting to use this command, I am not allowed to enter it in the chat. I spam return and it just stays in the edit box. All other chat messages and chat commands go through even despite errors, but this one doesn't go through at all.
I believe changing zone, relogging etc works, but that is not great during a boss fight. I unfortunately don't know what causes it.
Using latest Curseforge version, latest WotLK client.

commented

Sounds like youre getting an error, try doing /console scriptErrors 1

commented

I'll try this next time I get the issue, but it is infrequent.

commented

You just have to run it once, and all future lua errors will show up

commented

Definitely, but also the ones for all my other addons; I wouldn't want to play with a permanent error window until this issue arises again.
Though there is the chance that I won't be able to see the error unless it is turned on ahead of time. I don't really see a good solution for that.

commented

Ok, I got the error again in today's raid, enabled the console command and got this:

Message: ...dOns\RCLootCouncil_Classic\RCLootCouncil\ml_core.lua:100: attempt to get length of field 'lootTable' (a nil value)
Time: Sun Nov  6 18:54:09 2022
Count: 2
Stack: ...dOns\RCLootCouncil_Classic\RCLootCouncil\ml_core.lua:100: attempt to get length of field 'lootTable' (a nil value)
[string "=[C]"]: ?
[string "@Interface\AddOns\RCLootCouncil_Classic\RCLootCouncil\ml_core.lua"]:100: in function `AddItem'
[string "@Interface\AddOns\RCLootCouncil_Classic\RCLootCouncil\ml_core.lua"]:345: in function `AddUserItem'
[string "@Interface\AddOns\RCLootCouncil_Classic\RCLootCouncil\core.lua"]:971: in function `ChatCmdAdd'
[string "@Interface\AddOns\RCLootCouncil_Classic\RCLootCouncil\core.lua"]:434: in function `?'
[string "@Interface\AddOns\ArkInventory\Externals\Ace3\AceConsole\AceConsole-3.0.lua"]:90: in function `?'
[string "@Interface\FrameXML\ChatFrame.lua"]:4933: in function <Interface\FrameXML\ChatFrame.lua:4879>
[string "=[C]"]: in function `ChatEdit_ParseText'
[string "@Interface\FrameXML\ChatFrame.lua"]:4596: in function <Interface\FrameXML\ChatFrame.lua:4595>
[string "=[C]"]: in function `ChatEdit_SendText'
[string "@Interface\FrameXML\ChatFrame.lua"]:4632: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>

Locals:

Seems to be a conflict with ArkInventory, going by line 9?
Though I'm not sure why it only happens sometimes or what triggers the issue, as relogging fixes it.

The function in AceConsole-3.0.lua is (lines 77-103):

--- Register a simple chat command
-- @param command Chat command to be registered WITHOUT leading "/"
-- @param func Function to call when the slash command is being used (funcref or methodname)
-- @param persist if false, the command will be soft disabled/enabled when aceconsole is used as a mixin (default: true)
function AceConsole:RegisterChatCommand( command, func, persist )
	if type(command)~="string" then error([[Usage: AceConsole:RegisterChatCommand( "command", func[, persist ]): 'command' - expected a string]], 2) end

	if persist==nil then persist=true end	-- I'd rather have my addon's "/addon enable" around if the author screws up. Having some extra slash regged when it shouldnt be isn't as destructive. True is a better default. /Mikk

	local name = "ACECONSOLE_"..command:upper()

	if type( func ) == "string" then
		SlashCmdList[name] = function(input, editBox)
			self[func](self, input, editBox)
		end
	else
		SlashCmdList[name] = func
	end
	_G["SLASH_"..name.."1"] = "/"..command:lower()
	AceConsole.commands[command] = name
	-- non-persisting commands are registered for enabling disabling
	if not persist then
		if not AceConsole.weakcommands[self] then AceConsole.weakcommands[self] = {} end
		AceConsole.weakcommands[self][command] = func
	end
	return true
end

Line 90 is self[func](self, input, editBox)

commented

Sure. Can I privately send you those in a zip somehow?

commented

I also only just noticed that this is the wrong repo. Sorry about that. Should I create a copy issue in the correct one?

commented

It's probably easiest to send it on Discord.
No that's okay, you don't have to copy it.

commented

Sure, what's your Discord user name, and do you have any specific / public server I could join to have a mutual one? I am on all Classic class discords.

commented

I don't think its an addon clash. The error indicates it's caused by attempting do ML stuff without the ML module being ready, i.e. haven't clicked "Yes" to the usage popup etc. I did add extra checks in recent versions that should prevent this, but it seems like it doesn't work.

How often does this happen? Are you doing anything special when it happens (recent /reload, change loot method, etc)?

commented

We are always using group loot. I rarely get errors so I never really reload during raids.
We kill the boss(es), I wait until everybody has passed all items so I receive them, and then try to use the command.

Got the issue again today on both of my characters. It's always the first time that doesn't work, then I relog, and then it works for the rest of the raid. Same error each time, even across all three current tier instances.

commented

Odd. Think I need to have a look at your saved variables

commented

Took it for granted you were on the RCLootCouncil Discord - https://discord.gg/WfYhCx9