hi everyone and happy christmas eve, i'm new to this lua, could someone help me how to reverse string example
FACTION_STANDING_INCREASED = "%s %d"
for
FACTION_STANDING_INCREASED = "%d %s"
I found this code but it doesn't work
ChatFrame_AddMessageEventFilter("CHAT_MSG_COMBAT_FACTION_CHANGE", function(frame, event, message, ...)
local which, faction, amount = strmatch(message, "^[%+%-] (%+) (%d+) rep$")
if which and faction and amount then
return false, (format("%s%d %s rep", which, amount, faction)), ...
end
end)
|