• 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!

Condition Limit in source

Pawcio6

Member
Joined
Sep 26, 2009
Messages
143
Solutions
4
Reaction score
15
Hi
I have problem with adding new conditions after CONDITION = 1 << 31 in 0.3.6 source. I tried fiew editing but always cant compile it. My condition.h file
Code:
    CONDITION_HUNGRY = 1 << 31,
    CONDITION_FURYATTRIBUTES = 1 << 32,
    CONDITION_SPELLCOOLDOWN = 8589934592,
and i get error for 1 << 32 like
Code:
\Desktop\0.3.6pl1.r101\condition.h [Warning] left shift count >= width of type
and for numbers like
Code:
Desktop\0.3.6pl1.r101\condition.h integer constant is too large for "long" type
in condition.cpp
Code:
    uint32_t _type = 0;
    if(!propStream.GET_ULONG(_type))
        return NULL;
edited to
Code:
    uint64_t _type = 0;
    if(!propStream.GET_LLONG(_type))
        return NULL;
and added to fileloader.h
Code:
inline bool GET_LLONG(uint64_t &ret) {return GET_VALUE(ret);}
but i still cant compile it. Someone can help me with it?
 
Code:
CONDITION_SPELLCOOLDOWN = 8589934592,

Code:
CONDITION_SPELLCOOLDOWN = 1LL << 33,

Try that.
 
Back
Top