Originally Posted by sinnereso
Ive been working with this gem but cant get it working.. i know im close but cant seem to put my finger on why. any suggestions?
Code:
function RidinDirty.TravelToPlayer()
local savedPlayer = RidinDirty.savedVariables.savedPlayer -- target saved player
local effectId = RidinDirty.savedVariables.effectId
local effectDelay = RidinDirty.savedVariables.effectDelay
local savedPlayerId = nil -- savedID reset
for i = 1, GetGroupSize() do
local savedPlayerId = GetGroupUnitTagByIndex(i)
if not GetUnitDisplayName("savedPlayerId") == savedPlayer then
df("|c9900FF[RidinDirty]|r unit online is %s", savedPlayer) -- trying to execute this ONLY if previous line matches original savedPlayer
end
end
|
The quotation marks in GetUnitDisplayName shouldnt be there. It should be:
Code:
GetUnitDisplayName(savedPlayerId)
also i had a look at your addon.
Instead of creating and overwriting your save variables 6 times during initialization, i recommend doing it once and provide your default values within one table.