View Single Post
10-01-18, 06:52 AM   #5
Lyak
A Cyclonian
Join Date: Jul 2018
Posts: 46
Originally Posted by Xrystal View Post
Not sure as I haven't crossed that bridge myself. I would have assumed if wow wrote it to the data in that format it would understand it to read it back in correctly. Have you checked if it causes a problem when reading it back out ?

Otherwise, I would probably not save them but rather check what data they point at and put them in the relevant section of the data.

EG.

|c123456|r is a color string - I would read the string, see it has a |c in it and read the following characters in and assign them the relevant color code r,g,b,a and then stop when it hits |r and save it in a color table to and replace the string with something that can be validated myself such as COLOR[key] and replace COLOR[key] with the contents of COLOR[key] when restoring the data to the screen. Of course that is just theory and may not be physically possible in exactly this way.

Maybe someone has come across this and resolved the problem, or have a work around.
Hi again Xrystal!

So, basically when I input |cFFFFFFFF|r through the text editor, then save it to SV, this will save ||cFFFFFFFF||r as I mentioned at the start. Then if I read it back (e.g. print(myDB.test)), this will print out |cFFFFFFFF|r which I'm guessing is because the client(?) is translating '||' to '|' as you've explained on your first comment.

I think I'll need a further experiment on this

-- EDIT #1

Alright, I think I got the temporary solution(?).

I'll just let it to save with those double slashes, but make it replace to single slash via string.gsub whenever I need to use it.

I think that's the cheapest work around haha !!

-- EDIT #2

Yeap, it's looking awkward, but at least it's working

Last edited by Lyak : 10-01-18 at 07:04 AM.
  Reply With Quote