#Script "sourceName > spellLink > destName" issue

56 messages · Page 1 of 1 (latest)

sharp oriole
#

You didn't say what the error was, but just putting a spell name in square brackets doesn't make it a link

pure dagger
sharp oriole
#

Well you're throwing a nil in there somewhere.
Might as well nil check all the values before concatenating them, including the WA ones because I don't think WA would be careful to use empty strings when they have no values

#

e.g.

local sN = aura_env.state.sourceName or ""
local spell = aura_env.state.spellName
local link = spell and GetSpellLink(spell) or ""
local dN = aura_env.state.destName or ""
local output = format("%s used %s on %s", sN, link, dN)
SendChatMessage(output, IsInGroup(2) and "INSTANCE_CHAT" or IsInRaid() and "RAID" or "PARTY")

Also you can just use %c on a regular chat message setting and let WA handle the SendChatMessage bit

pure dagger
#

do you think i should set a source type and dest type in the trigger, to force grabbing this information specifically?

sharp oriole
#

Empty strings can concatenate but nils can not.

#

Only alter your trigger if it makes it more accurate.
Alter the code so it doesn't error

pure dagger
#

@sharp oriole think this fixed it, i tested it with some mage ability that has 100% destination and source, but its my own output, need to test it with someone casting the actual spell on me now

#

well at least it didnt spit out an error

#

Fck 😦 Sadly still the same thing...

#

maybe the spells dont have a destination on a blizz system side?

pure dagger
pure dagger
#

Well if someone can help me fixing it that would be awesome.. i think im too stupid to understand it. Its just 4 spells im tracking and the syntax is correct (rebirth, intercession, raise ally, soulstone), soulstone works fine, i cant see why other spells dont work

#

And as always, im trying to skip advanced functions/coding :/.

sharp oriole
#

You didn't change the code you're using

sharp oriole
#

Worth a try

pure dagger
#

this with soulstone, im starting to think its the spells being weirdly bugged by blizzard

#

Its tilting xD basically same thing that my simple code did, but now we can see its empty and its the spell being faulty, anything else we can do with it ;-:?

sharp oriole
#

The events have the info they have 🤷‍♂️

pure dagger
#

means its doomed? D:

pure dagger
#

Why is this thing working and the other isnt

sharp oriole
#

You've got a bunch of triggers so probably an issue with dynamic info

dreamy summit
#

!linkit if you want more specific help

coarse graniteBOT
#

WeakAuras doesn't show anything by default, it's just the framework that lets you import or create "Auras" to display things. If you're having an issue with an Aura, and/or want opinions on it, then you need to share the specific Aura. The best way to do this is to link it through https://wago.io/.

If you only imported the aura, you may right click the aura in-game and select Copy URL and paste it here. If you have modified the aura or created your own, you may instead select Export to string... and upload the string to https://wago.io/. This does not require an account.
You can now paste the import string directly into Discord (with no other text, only the string) and a bot will import it for you and link the wago.

pure dagger
# dreamy summit !linkit if you want more specific help

my plan for today is split it into 4 auras so they handle only one trigger and test what asakawa said, maybe it really is too many triggers in one aura o this type, however im not sure, soulstone is trigger 4, so the weakaura has to go through 3 other triggers and the soulstone specifically works, while rebirth which is trigger 1 doesn't

#

Alright... i duplicated the weakaura and left only rebirth trigger in it, it did not work aswell, the error still remains the same

dreamy summit
#

Just tested this with Rebirth and both outputs worked with no errors. :?

pure dagger
#

the bug appears mostly when someone else casts it

#

someone else > you, someone else > someone else

dreamy summit
#

yea I tested it with me casting on someone

#

GetSpellLink
number|string - Spell ID or Name. When passing a name requires the spell to be in your Spellbook.

#

Its returning nil because you can't use the spellname if your character doesn't know Rebirth.

#

CLEU for spellcast contains the spellID so you just need to use that instead

#

that may not be the only problem though

pure dagger
dreamy summit
#

the trigger you're already using

#

just do aura_env.state.spellId

#

I think that's what it's called im not sure

pure dagger
# dreamy summit just do aura_env.state.spellId

oh lord. i feel so autistic rn, the getspelllink takes id, of course, i brainstormed it so much and i put name in it... i wont call it success yet though, i will when i test it first, but im certainly sure it will work, it makes sense now. the name worked because it grabs the spell from somewhere, and its the spellbook

#

took me 1.5 week and you noticed it instantly xD

#

yeah ofc it works, thank u so much WA_heart

#

is there a way to possibly cut the server -.... out of the output in the command also? just like the built in Chat Message feature with formatting enabled

dreamy summit
#

yea

#

there's a call that cuts out the server

#

I don't remember it

pure dagger
#

a call? is it blizzard command or weakaura 😄

#

i will look it up

#

and possibly put it in it: SendChatMessage(aura_env.state.sourceName.." ›› "..GetSpellLink(aura_env.state.spellId).." ›› "..aura_env.state.destName, IsInGroup(2) and "INSTANCE_CHAT" or IsInRaid() and "RAID" or "PARTY")

dreamy summit
#

change aura_env.state.sourceName to GetUnitName(UnitTokenFromGUID(aura_env.state.sourceGUID),false)