Hex into String without format - 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)
+--- Thread: Hex into String without format (
/showthread.php?tid=455303)
Hex into String without format -
IgrexolonO - 01.08.2013
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?
Re: Hex into String without format -
Bakr - 01.08.2013
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?
Re: Hex into String without format -
IgrexolonO - 01.08.2013
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.
Re: Hex into String without format -
Vince - 01.08.2013
What's the purpose? And why did you put
number between quotes? Are you insinuating that the information Bakr gave you is wrong?
Re: Hex into String without format -
IgrexolonO - 01.08.2013
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.