Lua error when trying to save UI

I keep getting a Lua error when I try to save action bars in any format that has more than 1 row. I have deleted all mods, wtf and cache folders.

Message: Interface/FrameXML/EditModeSystemTemplates.lua:473: attempt to perform arithmetic on a nil value
Time: Tue Nov 29 22:25:29 2022
Count: 4
Stack: Interface/FrameXML/EditModeSystemTemplates.lua:473: attempt to perform arithmetic on a nil value
[string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:473: in function `BreakFrameSnap'
[string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:41: in function `PrepareForSave'
[string "@Interface/FrameXML/EditModeManager.lua"]:1118: in function `PrepareSystemsForSave'
[string "@Interface/FrameXML/EditModeManager.lua"]:1123: in function `SaveLayouts'
[string "@Interface/FrameXML/EditModeManager.lua"]:1132: in function <Interface/FrameXML/EditModeManager.lua:1128>
[string "=(tail call)"]: ?
[string "@Interface/SharedXML/SharedUIPanelTemplates.lua"]:1198: in function <Interface/SharedXML/SharedUIPanelTemplates.lua:1194>

Locals: self = CompactRaidFrameContainer {
 0 = <userdata>
 GetUnitFrame = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:315
 UpdateMagnetismRegistration = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:521
 GetSnapOffsets = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:421
 systemInfo = <table> {
 }
 IsFrameAnchoredToMe = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:484
 ApplyToFrames = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:115
 alwaysUseTopLeftAnchor = true
 breakSnappedFramesOnSave = true
 SetFlowSortFunction = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:89
 SetBorderShown = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:110
 UseCombinedGroups = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:877
 ResetToDefaultPosition = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:158
 GetScaledSelectionSides = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:365
 SelectSystem = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:549
 GetFrameMagneticEligibility = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:504
 UpdateSystemSettingUseLargerFrame = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:986
 AddLayoutChildren = <function> defined @Interface/SharedXML/LayoutFrame.lua:48
 IsBelowFrame = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:332
 SetScaleBase = <function> defined =[C]:-1
 HasActiveChanges = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:254
 AddFlaggedUnits = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:274
 flowFilterFunc = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameManager.lua:523
 DoesSettingDisplayValueEqual = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:278
 OnLoad = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:14
 UpdateDisplayInfoOptions = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:289
 settingDisplayInfoMap = <table> {
 }
 GetSettingValueBool = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:269
 TryUpdate = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:126
 IsLayoutFrame = <function> defined @Interface/SharedXML/LayoutFrame.lua:36
 DoesSettingValueEqual = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:273
 MarkDirty = <function> defined @Interface/SharedXML/LayoutFrame.lua:90
 UpdateSelectionVerticalState = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:1101
 AddUnitFrame = <function> defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:303
 Add

Message: Interface/FrameXML/EditModeSystemTemplates.lua:473: attempt to perform arithmetic on a nil value
Time: Tue Nov 29 22:24:58 2022
Count: 1
Stack: Interface/FrameXML/EditModeSystemTemplates.lua:473: attempt to perform arithmetic on a nil value
[string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:473: in function `BreakFrameSnap'
[string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:443: in function `BreakSnappedFrames'
[string "@Interface/FrameXML/EditModeManager.lua"]:408: in function `RevertSystemChanges'
[string "@Interface/FrameXML/EditModeDialogs.lua"]:419: in function <Interface/FrameXML/EditModeDialogs.lua:417>
[string "=(tail call)"]: ?
[string "@Interface/SharedXML/SharedUIPanelTemplates.lua"]:1198: in function <Interface/SharedXML/SharedUIPanelTemplates.lua:1194>

Locals: self = MultiBar6 {
 0 = <userdata>
 buttonPadding = 2
 UpdateSystemSettingAlwaysShowButtons = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:787
 UpdateMagnetismRegistration = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:521
 GetSnapOffsets = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:421
 UpdateFrameStrata = <function> defined @Interface/FrameXML/ActionBar.lua:194
 UpdateButtonArt = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:684
 IsFrameAnchoredToMe = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:484
 buttonTemplate = "MultiBar6ButtonTemplate"
 ShowBase = <function> defined =[C]:-1
 IsShown = <function> defined @Interface/FrameXML/ActionBar.lua:286
 GetSelectionOffset = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:373
 ResetToDefaultPosition = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:158
 RefreshButtonArt = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:677
 GetScaledSelectionSides = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:365
 SelectSystem = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:549
 buttonArtDirty = false
 GetFrameMagneticEligibility = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:504
 AddLayoutChildren = <function> defined @Interface/SharedXML/LayoutFrame.lua:48
 IsBelowFrame = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:332
 UpdateSystemSettingIconSize = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:729
 SetScaleBase = <function> defined =[C]:-1
 HasActiveChanges = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:254
 GetScaledCenter = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:358
 DoesSettingDisplayValueEqual = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:278
 Layout = <function> defined @Interface/SharedXML/LayoutFrame.lua:333
 settingDisplayInfoMap = <table> {
 }
 GetSettingValueBool = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:269
 IsLayoutFrame = <function> defined @Interface/SharedXML/LayoutFrame.lua:36
 DoesSettingValueEqual = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:273
 MarkDirty = <function> defined @Interface/SharedXML/LayoutFrame.lua:90
 ShouldResetSettingsDialogAnchors = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:101
 dirtySettings = <table> {
 }
 UpdateGridLayout = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:663
 IsToTheLeftOfFrame = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:314
 GetSettingsDialogAnchor = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:298
 hasActiveChanges = false
 OnSystemLoad = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:3
 ClearFrameSnap = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:458
 GetCombinedCenterOffset = <function> defined @Interface/FrameXML/EditModeSystemTemplates.lua:408
 SetupSettingsDialogAnchor = <function> defined @Interface/FrameXML/Ed
6 Likes

I’m having the exact same problem. Started this morning, last night everything was fine. I’ve also deleted my Cache, Interface, and WTF folders and tried with no addons. I’m receiving a similar error:

Message: Interface/FrameXML/EditModeSystemTemplates.lua:473: attempt to perform arithmetic on a nil value
Time: Wed Nov 30 04:37:10 2022
Count: 1
Stack: Interface/FrameXML/EditModeSystemTemplates.lua:473: attempt to perform arithmetic on a nil value
[string “@Interface/FrameXML/EditModeSystemTemplates.lua”]:473: in function BreakFrameSnap' [string "@Interface/FrameXML/EditModeSystemTemplates.lua"]:41: in function PrepareForSave’
[string “@Interface/FrameXML/EditModeManager.lua”]:1118: in function PrepareSystemsForSave' [string "@Interface/FrameXML/EditModeManager.lua"]:1123: in function SaveLayouts’
[string “@Interface/FrameXML/EditModeManager.lua”]:1132: in function <Interface/FrameXML/EditModeManager.lua:1128>
[string “=(tail call)”]: ?
[string “@Interface/SharedXML/SharedUIPanelTemplates.lua”]:1198: in function <Interface/SharedXML/SharedUIPanelTemplates.lua:1194>
Locals: self = CompactRaidFrameContainer {
0 =
GetUnitFrame = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:315
UpdateMagnetismRegistration = defined @Interface/FrameXML/EditModeSystemTemplates.lua:521
GetSnapOffsets = defined @Interface/FrameXML/EditModeSystemTemplates.lua:421
systemInfo = {
}
IsFrameAnchoredToMe = defined @Interface/FrameXML/EditModeSystemTemplates.lua:484
ApplyToFrames = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:115
alwaysUseTopLeftAnchor = true
breakSnappedFramesOnSave = true
SetFlowSortFunction = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:89
SetBorderShown = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:110
UseCombinedGroups = defined @Interface/FrameXML/EditModeSystemTemplates.lua:877
ResetToDefaultPosition = defined @Interface/FrameXML/EditModeSystemTemplates.lua:158
GetScaledSelectionSides = defined @Interface/FrameXML/EditModeSystemTemplates.lua:365
SelectSystem = defined @Interface/FrameXML/EditModeSystemTemplates.lua:549
GetFrameMagneticEligibility = defined @Interface/FrameXML/EditModeSystemTemplates.lua:504
UpdateSystemSettingUseLargerFrame = defined @Interface/FrameXML/EditModeSystemTemplates.lua:986
AddLayoutChildren = defined @Interface/SharedXML/LayoutFrame.lua:48
IsBelowFrame = defined @Interface/FrameXML/EditModeSystemTemplates.lua:332
SetScaleBase = defined =[C]:-1
HasActiveChanges = defined @Interface/FrameXML/EditModeSystemTemplates.lua:254
AddFlaggedUnits = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:274
flowFilterFunc = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameManager.lua:523
DoesSettingDisplayValueEqual = defined @Interface/FrameXML/EditModeSystemTemplates.lua:278
OnLoad = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:14
UpdateDisplayInfoOptions = defined @Interface/FrameXML/EditModeSystemTemplates.lua:289
settingDisplayInfoMap =

{
}
GetSettingValueBool = defined @Interface/FrameXML/EditModeSystemTemplates.lua:269
TryUpdate = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:126
IsLayoutFrame = defined @Interface/SharedXML/LayoutFrame.lua:36
DoesSettingValueEqual = defined @Interface/FrameXML/EditModeSystemTemplates.lua:273
MarkDirty = defined @Interface/SharedXML/LayoutFrame.lua:90
UpdateSelectionVerticalState = defined @Interface/FrameXML/EditModeSystemTemplates.lua:1101
AddUnitFrame = defined @Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua:303
Add

3 Likes

I found a really annoying work around.

Make a copy of the profile you want to change. Make the change and save it in the copy. If you want to change anything else, then you need to make another copy of the copy and do the same thing.

So what I was doing was make of copy of profile 1. Make the change in copy of profile 1. Delete profile 1. Make a copy of profile 1 if you need to make another change.

5 Likes

Thank you so much, that worked perfectly.

1 Like

getting the same Lua Error.

How do you copy your profile? If i try to create a new one with the same layout i cant seve it (Lua Error) I disabled all my addons, of course

2 Likes

Beside the name of your profile you see a :no_entry_sign: and a :gear:

Imgur

What I do is select copy and make a profile with a different name.

Sometimes the game will give me a Lua when I copy the profile. So I switch to one of the preset profiles and then try to copy the profile I want to change again.

It’s really finicky.

Experiencing the same lua error beginning today. Neither new nor existing layouts can be saved. The workaround just doesn’t seem to stick for me, sadly.

1 Like

thanks man but i get the lua error even when i try to copy the profile, or even if i try to rename it. Lua error all the way

1 Like

Same here, started today. Cannot save changes or make new layouts. I posted the error code in the larger UI thread.

1 Like

Yeah it’s terrible.

It’s stopped working on my paladin now. So now I have to log onto an alt to try and make changes.

1 Like

Also having this issue. Can not even load other versions of the UI - even the default 2 - Can not delete any premade ones either. Every time i hit save i get a bunch of errors or nothing happens except my party frames jump downward for w.e reason -.- This was not an issue til today and ive did all the things as everyone else above to no avail.
Only work around I have found is an annoying time consuming one - I redid all my UI’s / Imported similar ones / alts of same class then messed around a bit with that, then hit save as a new ui and character specific… I copied and pasted all my load outs into note pad in case they got wonky again and i end up with party frames in my chat, my bars all out of wack, missing bars, or all my bars overlapping everywhere. Sometimes even the making new loadout w character specific selected gets wonky and either doesnt wanna save or reverts to w/e placement with w/e number of icons and messes up my bars completely even abilities wise -.-’’…

I cant even delete, edit, or change up any pre-existing ui and if i try to select even the 2 preset by the game itself also nothing. So for now I have like 4-5 diff character specific saves just because i realized i forgot to move something before making the new loadout since editing and deleting the other one isnt an option at all.

I to am having the same issues. I’ve removed all my addons, deleted the WTF, Interface, and Cashe directories, and still get the same lua error

Not sure if this was said already, I didn’t read through updates on the thread. I Just fixed the arithmetic on a nil value error by deleting these files. .

Go to WTF/Account and delete edit-mode-cache-account and .old. Also delete flagged-cahce-account and .old.

Go into each character folder on your server, and delete edit-mode-cache-character and flagged-cache-character.

Start over. It may only be the edit-mode-cache files only, dumping the flagged-cache files won’t hurt.

There is something else going on with party frames, it wants it to stay in the default location, but the LUA error is gone for me after doing this and deleting the files in the character folders makes it so I don’t have to go to alts.

2 Likes

That worked for me!

This did not work for me. :frowning: Same error and now all my layouts are gone with no way to put them back.
Edit: I imported the code from my old layout and it threw the error but did save. Still get the nil lua error for making new layouts and trying to save changed.

My fix to this was…

  1. Switch back to one of the preset profiles.
  2. Delete the custom one I already saved from there.
  3. While still in the chosen preset start to lay out your UI.
  4. Save your setup.
  • Hope this helps.

I found a work around. It seems the bug is with my default UI. I selected the new layout option from the dropdown in the HUD Edit Mode and it allowed me to save my changes.

Hope this helps others that are stuck.

1 Like

Easier workaround that I discovered: make sure Raid Frames and Boss Frames are toggled on during Edit Mode, and that you don’t have an addon hiding them, then /reload

4 Likes

Hi everyone, so I wanted to say that I found a solution to my problem, since i was having the same error today.
Usually i browse these things and never post, so here goes…

I was getting the LUA error, same as all of you, and none of the given answers helped, but i did find out that the issue I think stems from being on a different character then the original character when I made the custom HUD to begin with.

For example, on my new Dracthyr character I was getting the error trying to copy or save a new HUD from what i used on my priest. However, the HUD on my new character had a bunch of things turned off. Extra action bars and such, for example. When i enabled all that was originally missing from the Priest’s HUD, I was suddenly able to save/copy and generally make a new HUD for my new Dracthyr as desired.
Maybe this will help you guys?