Hex into String without format
#1

Hai. I'm looking for a simple way to put my hex into string variable.

Код:
new color[7];
strcpy(color, (GetPlayerColor(playerid) >>> 8), sizeof(color));
error 035: argument type mismatch (argument 2)

So, is there any way to do this without format?
Reply
#2

Hexadecimal is just a different way to display the number. It's a mismatch because you are trying to insert a number when the parameter takes a string.

Why don't you want to use format anyway?
Reply
#3

Cause it's slow bruh. Gonna try convert dat 'number' into string then. KKthx.

Код:
	new color[7];
	valstr(color, (GetPlayerColor(playerid) >>> 8));
Works cool. Ty.
Reply
#4

What's the purpose? And why did you put number between quotes? Are you insinuating that the information Bakr gave you is wrong?
Reply
#5

Yh. Finally used format. No idea how to do dat without format.

U know I need it in format "FFFFFF", to put it between brackets.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)