Lua Error 1077 is caused by Castrandom macro command

I’m posting this to report a bug and to provide a solution for users similarly affected by this bug. I was getting a random Lua Error popup on one of my characters that reads as follows:

Interface\FrameXML\ChatFrame.lua:1077: bad argument #1 to ‘strlower’ (string expected, got no value)

Tried to run the game without addons, still got the error. Tried to delete that character folder in Windows, no effect. Then at some point I edited a macro on a different character and all of a sudden started getting the same Lua Error popup! The macro change was to add Castrandom command, to call random mounts from the list in my case. Now the Castrandom was broken since a few patches back but still kind of works - it calls the same mount until you log off for example. I removed the command and restored the original macro, the Lua Error disappeared. I went back to the original character and sure enough there was a macro with Castrandom. Deleted the macro - no more errors! So here is your short term solution:

Solution: Make sure to remove any Castrandom command from your macros.

One way is to replace the Castrandom with Castsequence in your macro. It’s not exactly the same as it calls the list in sequence, one after another, but still close enough to work. For those of you quick to point out that there is a call random mount button in the game, I know. It just works from the same list of favorite mounts on all characters and I prefer to have different list per character. And yes, there are addons that can do that. Again, I know. I just prefer to run my game with minimum addons.

Hope this helps someone.

1 Like