Posts: 536
Threads: 81
Joined: Mar 2017
Reputation:
0
Hello, I have a question! I'm using dini saving system and I want to save RGBA(HEX) colors how I can save it and load it? I tried to save it as string, but SetPlayerColor doesn't working!
Please help, +1 REP!
Thanks!
Posts: 944
Threads: 128
Joined: Sep 2014
Reputation:
0
You could save it as an integer, but I believe it's also possible to save it as a string and then use sscanf and the "x" specifier when you load it.
Posts: 536
Threads: 81
Joined: Mar 2017
Reputation:
0
I'm not using sscanf!!! I'm using only dini!
+ If I make it as an integer, it saves as 0!
Posts: 536
Threads: 81
Joined: Mar 2017
Reputation:
0
Can I load it without using sscanf?
Posts: 578
Threads: 40
Joined: Dec 2016
What's the big deal? Everything DINI does is in strings, but you don't know what basic code tells you, so you don't know that right...
Download SSCANF R2, use it for defining a string for a hex using X or H in the format.
Posts: 1,773
Threads: 47
Joined: Jan 2015
Reputation:
0
Hex is integer.
Just save the hex code using dini_IntSet. And then you'll get it back as a integer using dini_Int.
Posts: 536
Threads: 81
Joined: Mar 2017
Reputation:
0
When I save it as integer, it saves to 0!
Can you give me code for loading the color using Ysi_ini or Dini?