sscanf HEX values help
#1

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;
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];
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;
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
Invalid inputs:
Код:
 -0x101
 0xG213
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
Reply


Messages In This Thread
sscanf HEX values help - by jessejanssen - 10.06.2014, 01:05
Re: sscanf HEX values help - by Pottus - 10.06.2014, 01:21
Re: sscanf HEX values help - by jessejanssen - 10.06.2014, 01:30
Re: sscanf HEX values help - by Pottus - 10.06.2014, 02:09
Re: sscanf HEX values help - by jessejanssen - 10.06.2014, 02:51

Forum Jump:


Users browsing this thread: 1 Guest(s)