Hex to string
#1

How to set hex as a string?
I have tried it with format, but it always outputs **!!+*
Reply
#2

Did you used %x character when you tried to format it?
Reply
#3

Of course
Reply
#4

Strange. Can you show that part of code?
Reply
#5

format(string, 32, "%x", 0xFF9900AA);
Reply
#6

pawn Код:
format(string, 32, "%x", 0xFF9900);    // try to use it without "AA" letters
I don't see any other way.
Reply
#7

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?
Reply
#8

Glad that it helped.
Reply
#9

Use two %x ^^"

pawn Код:
format(string, 32, "%x%x", 0xFF9900, 0xFF);
Reply
#10

not exactly what I needed, but thanks for the response.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)