Solved Add another attribute

Discussion in 'Support' started by sirakx, Jan 11, 2017.

  1. sirakx

    sirakx Member

    Joined:
    Feb 23, 2015
    Messages:
    40
    Likes Received:
    7
    Best Answers:
    1
    I'm trying to add an attribute to the code. All good at the moment of adding the attribute I only have the detail that does not read it for a condition that I do not know what hexadecimal number I should put.

    img:

    [​IMG]

    And this are the functions with which I have conflict I do not know what hexadecimal value I have to put in order for the condition to be met. Could someone help me?

    [​IMG]
     
  2. Best Answer:
    Post #3 by Mkalo, Jan 11, 2017
  3. Static_

    Static_ Well-Known Member

    Joined:
    Feb 14, 2015
    Messages:
    3,086
    Likes Received:
    1,320
    Best Answers:
    185
  4. Mkalo

    Mkalo ボーカロイド Support Team

    Joined:
    Jun 1, 2011
    Messages:
    1,117
    Likes Received:
    878
    Best Answers:
    53
    Best Answer
    Use bitwise-or to get the new hex value:
    (0x7FFE13 | (1 << 23)) if it's an int attribute or (0x1EC | (1 << 23)) if it's a string attribute.

    In Lua 5.3:
    Code (Text):
    1. local mask = 0x7FFE13
    2. local bit = 1 << 23
    3. print("0x" .. ("%x"):format(mask | bit):upper())
    Output: 0xFFFE13
     
    sirakx likes this.
  5. sirakx

    sirakx Member

    Joined:
    Feb 23, 2015
    Messages:
    40
    Likes Received:
    7
    Best Answers:
    1
    Thanks, you saved me from going into depression hahaha :*
     

Share This Page

Loading...