Need help adding scripts into addons

So ever since I deleted my wow folder I’ve been missing some of my custom addons to help enhance my experience in little ways. Most of these addons were simple scripts put in a .lua file
However for some reason whenever I make new ones they just don’t work. For example:

code.lua
ChatTypeInfo.BN_WHISPER.sticky = 1;

Sticky whispers.toc

Interface: 90000

Title: Sticky whispers

code.lua

This should work but for some reason it’s not running the script on logging in. Am I doing something wrong? Perhaps something minor that I’ve forgotten since I’ve taken a year long hiatus.

Running the line of code with a /script does exactly what it’s meant to do but from what I remember I don’t need use /script in my addons.

Slap your code into https://addon.bool.no/
If it still doesn’t work then it’s likely a race condition issue.

I’ve already done that to test it but it gives the exact same code. I’m baffled because if I recreate my existing addons(manually or via that website) like the one to make my taskbar not blink when I get a whisper or such when I’m not active in the window it doesn’t work.

For example my first addon I ever made was with that website way back. It still works and it goes like this:

code.lua
– This file is loaded from “Flashy flashy no more.toc”

FlashClientIcon = function() end

Flashy flashy no more.toc

Interface: 80000

Title: Flashy flashy no more

code.lua

I don’t even dare touch it to update the interface to this expansion out of fear of breaking it somehow.

But as you can see the format is identical to the one I described above. Now I’ve tried recreating this exact addon and that new copy Is 100% identical but doesn’t work. I am just baffled.

So then it’s most likely a race condition issue. The setting you’re trying to change cannot be changed at the point that your addon is trying to change it. You’ll need to rewrite it to listen for a suitable event before firing.

That or just install one of these
https://www.curseforge.com/wow/addons/leatrix-plus
https://www.curseforge.com/wow/addons/prat-3-0

1 Like

Cor I just realised I don’t have my prat. Thanks friend I knew I was missing some big addons.

Hi,

Do you know where I can find more information on the events I would need to bind to?

I have the following line in my lua file to move my buff bar, however it’s the only one that doesn’t work when I login. I assume I need to wait until the buffs are loaded or something? ( it works fine then used as /run in game)

BuffFrame:SetPoint(“TOPRIGHT”,PlayerFrame,“TOPRIGHT”,1320,0);

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.