10.06.2014, 01:05
Hello dear reader,
I am busy working on a system attaching objects with text to vehicles, you have to input the textcolor and the background/object color, somehow the HEX values processed by sscanf turn out wrong, this is the code;
I would really swear this exact code has been working in the past but even if I know it for sure it isn't working now so I really need help on this, the weird thing is that the sscanf page says the next;
When I check the B2434F(F1) color in an online color picker it shows me the color you can see in the screenshot (Click image to enlarge):
But when I use it in the game (As background color as you can see in the screenshot) it turns out blue:
If anyone knows what's causing it/how to solve it you would really help me!
Best regards,
Jesse
I am busy working on a system attaching objects with text to vehicles, you have to input the textcolor and the background/object color, somehow the HEX values processed by sscanf turn out wrong, this is the code;
pawn Код:
new vehicleid, set[10], model, tekst[128], res, fsize, side[10], textcolor, backcolor;
if(!sscanf(params, "ds[10]s[10]ds[128]ddhh", vehicleid, set, side, model, tekst, res, fsize, textcolor, backcolor))
{
vText[vehicleid][slot][tColor] = textcolor;
vText[vehicleid][slot][bColor] = backcolor;
}
// The vText enum
enum vtext
{
tColor,
bColor
}
new vText[MAX_VEHICLES][4][vtext];
Quote:
Originally Posted by sscanf github page
"h" Specifier
This is a Simple Specifier, written as either h or x and representing hex numbers (that is, base 16 numbers written using the digits 0-9 and A-F, with an optional 0x prefix). Valid inputs: Код:
0 10 A b2434FF1 0x101 0XEEE Код:
-0x101 0xG213 |
But when I use it in the game (As background color as you can see in the screenshot) it turns out blue:
If anyone knows what's causing it/how to solve it you would really help me!
Best regards,
Jesse