View Single Post
10/15/23, 03:59 AM   #5
FlatBadger
 
FlatBadger's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2021
Posts: 17
Originally Posted by sinnereso View Post
this seems to be working so far:

Code:
victomCharacterName = victomCharacterName:sub(victomCharacterName:find("^[%w ]+"))
im no expert on other languages but my goal is to keep only alphanumeric and spaces from left to right which will filter out the ^Mx etc. Giving this a whorl a bit here to see if I get the rare error.

EDIT: Still gettin the random error.. ill have to revert back to stock CHARACTER NAME^Mx chat output for now until I get get it sorted. I thought I was gonna be a simple fix.
Have you tried
Code:
victomCharacterName = zo_strformat("<<1>>", victomCharacterName)
as sirinsidiator suggested? That should do the trick for you. I use
Code:
<<C:1>>
to retain initial capitalisation. There's a nice reference here for all your options: https://wiki.esoui.com/How_to_format...h_zo_strformat
  Reply With Quote