Solved Add another attribute

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

  1. sirakx

    sirakx Member

    Joined:
    Feb 23, 2015
    Messages:
    37
    Likes Received:
    7
    Best Answers:
    0
    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. Xeraphus

    Xeraphus Support Team Support Team Premium User

    Joined:
    Feb 14, 2015
    Messages:
    2,087
    Likes Received:
    784
    Best Answers:
    65
  4. Mkalo

    Mkalo ボーカロイド Support Team

    Joined:
    Jun 1, 2011
    Messages:
    1,036
    Likes Received:
    777
    Best Answers:
    36
    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:
    37
    Likes Received:
    7
    Best Answers:
    0
    Thanks, you saved me from going into depression hahaha :*
     

Share This Page

Loading...