Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: Holyrapid on June 07, 2011, 06:02:40 am

Title: About UMS by Ccoa
Post by: Holyrapid on June 07, 2011, 06:02:40 am
 8) I finally figured out why i couldn't get hexadecimal colors to work in UMS.
I didn't find any hints to this in the script, so i got frustrated and gave up. Many time i tried but to no avail.
Now, i looked at the demo and noticed, the colors need to have 0x in front of the in the \c[] box, normal, full red would be \c[0xff0000].
Also, do note that the letters, both the x and those in the actual code must be small (not capitals) for it to work.
This means that \c[0XFF0000] wouldn't work.

When i dug around the internet to find explanation as to why the hexa had 8 decimals, i found out that 0x somehow defines that it's a hexa code.
Hope this will help all those who are struggling with the color problem.
Title: Re: About UMS by Ccoa
Post by: PhoenixFire on June 07, 2011, 09:56:58 am
If I remember correctly, the 0x signifier is a Windows specific thingy. I don't remember everm running into that issue whilst running Ubuntu, Red Hat, or Plan 9.
Title: Re: About UMS by Ccoa
Post by: ForeverZer0 on June 07, 2011, 07:42:12 pm
It may be required on Windows, but it is not just a "Windows thingy".
Its a rule in programming to denote that it is hexadecimal. Otherwise, how would you be able to know the difference between these:

11 (Binary)
11 (Decimal)
11 (Hexadecimal)

The answer is that you cannot, and they are all different values. But if you add the notations, they can be easily told apart:

11b (Binary)
11 (Decimal)
0x11 (Hexadecimal)
Title: Re: About UMS by Ccoa
Post by: Blizzard on June 08, 2011, 02:14:57 am
0b11 is often used for binary. And you forgot octal (often a leading zero is used like 011).