This appears to be a Blizzard bug. The line of code that's causing it is as follows...

Code:

SaveBindings( GetCurrentBindingSet() or 1 );

Which would imply that GetCurrentBindingSet() is returning an invalid value. I'm discussing it with Blizz now and we'll see if we can run down what's happening.

Gregity

12-18-11 09:47 PM

Quote:

Originally Posted by spiel2001
(Post 241168)

This appears to be a Blizzard bug. The line of code that's causing it is as follows...

Code:

SaveBindings( GetCurrentBindingSet() or 1 );

Which would imply that GetCurrentBindingSet() is returning an invalid value. I'm discussing it with Blizz now and we'll see if we can run down what's happening.

Have you chased this down? I've tried bypassing the problem with code like

If GetCurrentBindingSet() == 2 then SaveBindings(2) Else SaveBindings(1) end

but, while the error went away, what happens is that the keybindings don't get applied at all (in at least some cases). It has to be returning a value other than nil, 1, or 2 for your code to get an error (I had tried the same coding and ran into the same error).

One of my posters noted that it only happened on logons other than the first. I was able to recreate the error on another account.

I went into keybindings and noted that the affected character had the checkbox for Character Specific Key Bindings checked and zero keybinds. I then did /script ReloadUI() and checked again, the keybinds were there, but the checkbox was not checked. I checked the box again and since then I haven't been able to reproduce the error on that account.

spiel2001

12-19-11 06:32 AM

No... I have not. It's been kind of an outlier case so I haven't invested a lot of time on it.

I think the bottom line is that there are cases where the system is trying to access key bindings before they have been loaded and I honestly don't know how to work around it.

I've thought of maybe making an oddball custom keybind that no one can access or change and testing it to see if it is set correctly... but that seems very expensive in long run.