ColorBetween function. Fail.
#2

Just make sth like this:

Код:
stock ColorBetween(ColorA, ColorB) {
    new str[11];
    valstr(str,ColorA);
    new x = strval(str);
    valstr(str,ColorB);
    new y = strval(str);
    return x-y;
}

printf("0x%x",ColorBetween(0xF, 0xA));
//-> Gives u 0x5
But attention ColorA must be >= ColorB
Reply


Messages In This Thread
ColorBetween function. Fail. - by Crayder - 19.03.2015, 07:02
AW: ColorBetween function. Fail. - by Kaliber - 19.03.2015, 07:19
Re: ColorBetween function. Fail. - by Vince - 19.03.2015, 10:22
Re: ColorBetween function. Fail. - by Crayder - 19.03.2015, 12:06
AW: Re: ColorBetween function. Fail. - by Kaliber - 19.03.2015, 12:17
Re: ColorBetween function. Fail. - by Vince - 19.03.2015, 14:41
Re: ColorBetween function. Fail. - by Crayder - 19.03.2015, 20:43

Forum Jump:


Users browsing this thread: 1 Guest(s)