Alright, I am updating MrBigglesworthDeath to add user selectable chat output. The slash commands to switch type work, and all the expected results are good, save one.
On line 16, I am trying to localize what the user selects to give feedback, however, the string is printing as is literally it is printing "Using %s chat type" instead of "Using RAID chat type" or "Using SAY chat type" for example.
What am I missing? It has to be simple...
Also, I plan on adding random chat sayings for the death message, and wanted to know that would work. Hey, I'm learning here!
local msg = string.format(L.MBD_CHAT_OUTPUT, self.options.chat)
Or would it be
local msg = string.format(L.MBD_CHAT_OUTPUT, addon.options.chat)
So, um, feeling stupid here, where would I put that since there is multiple occurrences of that message being printed? Or would I have to put that in every function that prints the message? Just wondering if there is a place in my code to do the string.format once and have the whole thing done?
So, um, feeling stupid here, where would I put that since there is multiple occurrences of that message being printed? Or would I have to put that in every function that prints the message? Just wondering if there is a place in my code to do the string.format once and have the whole thing done?
Alright, thanks for the shortcut, Jerry, and to Tekkub for the obvious. There is only one issue left, and that when I do the /mbd default command, it prints out the message correctly, but doesn't change the settings back to default. The strange thing is that I didn't play with that bit of code. http://pastey.net/125497
is the newest pastey. I wonder why that command isn't working?
**edit** nvm, I figured it out. It was that redundant line 121 ... I just commented out the whole line, and voila!
http://pastey.net/125490
On line 16, I am trying to localize what the user selects to give feedback, however, the string is printing as is literally it is printing "Using %s chat type" instead of "Using RAID chat type" or "Using SAY chat type" for example.
What am I missing? It has to be simple...
Also, I plan on adding random chat sayings for the death message, and wanted to know that would work. Hey, I'm learning here!
Or would it be
So, um, feeling stupid here, where would I put that since there is multiple occurrences of that message being printed? Or would I have to put that in every function that prints the message? Just wondering if there is a place in my code to do the string.format once and have the whole thing done?
?
Replace
by
everywhere it's used.
http://pastey.net/125497
is the newest pastey. I wonder why that command isn't working?
**edit** nvm, I figured it out. It was that redundant line 121 ... I just commented out the whole line, and voila!