pedr0fontoura / fivem-appearance

👀 A flexible player customization script for FiveM.
https://forum.cfx.re/t/release-fivem-appearance/2438537
MIT License
120 stars 72 forks source link

Tattoo data structure broken? #77

Closed DarinBeard closed 1 year ago

DarinBeard commented 1 year ago

So I grabbed the output from the editor with something in every option. I used that structure that the editor put out and tried to set the character appearance with that and it throws an error relating to tattoos. Something is wrong with the tattoo data structure between output and input. Is this a known issue?

DarinBeard commented 1 year ago

I turned off tattoos in the config and it saves and loads fine without them. There seems to be a problem with the data back and forth with them. Are you still working on this project or have you moved on?

DarinBeard commented 1 year ago

Well, I figured my issue out and I'll put it here for anyone that might possibly run into it. If converting back and forth from json to a typed object, the editor expects the tattoo zones, which are a list of zone values for each zone, to have a list there and not be null. Even if the list is empty. If the zone is null with no list, it will error. So I just had to make sure if there were not any tattoos for a particular zone, to make sure it had an empty list in the appearance data instead of being null.