Hello,
I am trying to replace magic characters with magic characters.
Or more specifically, parentheses with curly brackets.
But for some reason, I keep getting this error: invalid use of ‘%’ in replacement string.
I can’t seem to find a solution to this.
local x = "(hi)"
local y = "{hi}"
x = x:gsub("%(", "%{")
y = y:gsub("%{", "%(")
x = x:gsub("%)", "%}")
y = y:gsub("%}", "%)")
Could someone help me fix this problem?
Thanks.