About UMS by Ccoa

Started by Holyrapid, June 07, 2011, 06:02:40 am

Previous topic - Next topic

Holyrapid

 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.

PhoenixFire

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.
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

ForeverZer0

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)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

0b11 is often used for binary. And you forgot octal (often a leading zero is used like 011).
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.