If a skill/spell is tracked and not been used, the 'average' line does not print. This caused script to look for a value that didn't exist. Now the value will be set to '0' if none is found.
dnote(("@D[@GdTrack Reports@D]:@w returnTracked returned @R%s@w. The value found afterwards is @R%0.2f.@w"):format(returnTracked(columnone), tonumber(trim(string.sub(line, returnStringPosition("[", 1, line)+1, returnStringPosition("]", 1, line)-1)))))
local value = ("%0.2f"):format(tonumber(trim(string.sub(line, returnStringPosition("[", 1, line)+1, returnStringPosition("]", 1, line)-1))))
dnote(("@D[@GdTrack Reports@D]:@w returnTracked returned @R%s@w. The value found afterwards is @R%0.2f.@w"):format(returnTracked(columntwo), tonumber(trim(string.sub(line, returnStringPosition("[", 30, line)+1, returnStringPosition("]", 30, line)-1)))))
local value = ("%0.2f"):format(tonumber(trim(string.sub( line, returnStringPosition("[", 30, line)+1, returnStringPosition("]", 30, line)-1))))
dtrack.regular[returnTracked(columntwo)] = value
end
end
end
@ -158,8 +168,11 @@ function reportSwings()
dtrack.regular.swings,
dtrack.regular.hitpercent,
dtrack.regular.dph)
dnote( message )
if dtrack.regular.sname then
if tonumber(dtrack.regular.trackedavg) == nil then dtrack.regular.trackedavg = 0 end