[SOLVED] Save colors?
#1

Hello, I want to save colors so I use %d but for example for the violet color I have this 0x8000FFC9 after save I got this as output: -2147418167.. What can be the problem? I also used %x and %s these are even worser.
Reply
#2

Quote:
Originally Posted by » RэРиR «
Hello, I want to save colors so I use %d but for example for the violet color I have this 0x8000FFC9 after save I got this as output: -2147418167.. What can be the problem? I also used %x and %s these are even worser.
%s should work... %d is only for integers and hex numbers contain letters and numers.
Reply
#3

Quote:
Originally Posted by SAWC™
%s should work... %d is only for integers and hex numbers contain letters and numers.
Quote:
Originally Posted by » RэРиR «
I also used %x and %s these are even worser.
Edit: I tested it again and check the output lol:
Код:
 З.м\м
Reply
#4

Hex numbers are integers. When applying the color, just use -2147418167
Reply
#5

Quote:
Originally Posted by dice7
Hex numbers are integers. When applying the color, just use -2147418167
Oh! Will it work?
Reply
#6

https://sampwiki.blast.hk/wiki/Format
Quote:
Originally Posted by SAMP wiki
%x Inserts a number in hexadecimal notation.

EDIT: Or try: HexToInt(colorinhex); (returns an integer.)
Reply
#7

Quote:
Originally Posted by GTAguillaume
https://sampwiki.blast.hk/wiki/Format
Quote:
Originally Posted by SAMP wiki
%x Inserts a number in hexadecimal notation.
Yeah I know. But It didn't work. It was completly something else..
Reply
#8

It was already correct but It's my fault lol I didn't test it first in game.. Whatever thanx dice.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)