after a bit of debugging i managed to fix the problem, but the solution still kinda confuses me.
So the problem was that
local pattern1 = '^'..gsub(ITEM_SPELL_CHARGES, '%%d', '(%%d+)')..'$'
local pattern2 = '^'..gsub(ITEM_SPELL_CHARGES_P1, '%%d', '(%%d+)')..'$'
didn't return anything because
ITEM_SPELL_CHARGES & ITEM_SPELL_CHARGES_P1 were not set, which is kinda weird cause i googled they are supposed to be global variables set by wow?? im not sure.
my fix was to set the variables in the function like
ITEM_SPELL_CHARGES = "%d |4Aufladung:Aufladungen;";
ITEM_SPELL_CHARGES_P1 = "%d Charges"
i'm not even sure if that's correct but that did the trick
after fixing that i got another error in the function public.durability(tooltip)
same here
local pattern = '^'..gsub(DURABILITY_TEMPLATE, '%%d', '(%%d+)')..'$'
with DURABILITY_TEMPLATE not set, so i set it to
DURABILITY_TEMPLATE = "Haltbarkeit %d / %d";
the second error in my screenshot didn't appear after fixing the lua errors in info.lua
still not sure why these variables weren't set but it's all working now and your addon is really great