Hex to string - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Hex to string (
/showthread.php?tid=267779)
Hex to string -
Macluawn - 09.07.2011
How to set hex as a string?
I have tried it with format, but it always outputs
**!!+*
Re: Hex to string -
Norck - 09.07.2011
Did you used %x character when you tried to format it?
Re: Hex to string -
Macluawn - 09.07.2011
Of course
Re: Hex to string -
Norck - 09.07.2011
Strange. Can you show that part of code?
Re: Hex to string -
Macluawn - 09.07.2011
format(string, 32, "%x", 0xFF9900AA);
Re: Hex to string -
Norck - 09.07.2011
pawn Код:
format(string, 32, "%x", 0xFF9900); // try to use it without "AA" letters
I don't see any other way.
Re: Hex to string -
Macluawn - 09.07.2011
Surprisingly it worked, but that's not what I needed.
For someone that has any knowledge about this, is there any way to make this work including those alpha numbers?
Re: Hex to string -
Norck - 09.07.2011
Glad that it helped.
AW: Hex to string -
Nero_3D - 09.07.2011
Use two %x ^^"
pawn Код:
format(string, 32, "%x%x", 0xFF9900, 0xFF);
Re: Hex to string -
Macluawn - 10.07.2011
not exactly what I needed, but thanks for the response.