Unexpected Output Decimal to Binary/Hex

About Monkey 2 Forums Monkey 2 Programming Help Unexpected Output Decimal to Binary/Hex

This topic contains 8 replies, has 3 voices, and was last updated by  scurty 2 years, 6 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #4173

    scurty
    Participant

    So I’m trying to convert a Decimal value to Binary and Hex and I guess I don’t have the correct algorithm setup. Or maybe something else is up. This code translated into GML(Game Maker Language) seems to work as expected.

    It outputs 99 for the Hex Function and 45 for the Bin Function. Any ideas?

    #4176

    Jesse
    Participant
    [/crayon]
    #4177

    scurty
    Participant

    Oops. 4 not 8. Noob mistake. xD Gotta convert those strings. Haha.

    #4181

    Jesse
    Participant

    here a more complete set:

    [/crayon]
    #4182

    Mark Sibly
    Keymaster
    #4183

    Jesse
    Participant

    Thats funny, I have been through the string documentation several times but for some reason I never actually payed attention to those functions.

    #4184

    scurty
    Participant

    Wow. *super facepalm*

    Well I guess I know more about hex and binary now. xD Thank you Mark and everyone else. xD

    #4185

    Mark Sibly
    Keymaster

    It’s good practice to write these yourself at least once in your career I think!

    #4187

    scurty
    Participant

    You’re absolutely right! Knowledge is power these days. xD

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.