• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ enums update item attribute over 31 question

Marko999x

999x era
Premium User
Joined
Dec 14, 2017
Messages
2,751
Solutions
80
Reaction score
1,888
Location
Germany
I don't have any experience with c++ to be honest and I want to avoid getting problems
Can I just do it like this?

C++:
    ITEM_ATTRIBUTE_ATTACK_SPEED = 1 << 30,

    ITEM_ATTRIBUTE_CUSTOM = 1U << 31

    ITEM_ATTRIBUTE_TEST = 1 << 32
 
on 32+ number you should use extend
Lua:
1U << 32
i think 31 dont even need extend so was given as example for futher attributes but if you want to add new set of attributes maybe better would be to just use ITEM_ATTRIBUTE_CUSTOM

#edit
if you thinking about to adding more than one attribute remember to use larger numbers like 1LL
 
Last edited:
Back
Top