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

(HELP) Bug Look Summoned by SRC...

RexpeitaOzica

New Member
Joined
Jun 5, 2017
Messages
7
Reaction score
0
Hello, I'm trying to add it to the src when the player looks at the summon and it shows the name of the creator...
But I'm not succeeding.
It's giving me this error when compiling after I make changes
1>c:\users\malucos\desktop\src nova - copia\monster.h(73): error C2440: 'initializing': cannot convert from 'const Creature *' to 'Creature *' (compiling source file ..\monster.cpp)
1> c:\users\malucos\desktop\src nova - copia\monster.h(73): note: Conversion loses qualifiers (compiling source file ..\monster.cpp)


Here is the part I modified in monster.h
C++:
virtual std::string getDescription(int32_t) const {
            Creature* creature = getMaster();
            if (creature) {
                    return mType->nameDescription + ". Summoned by " + creature->getName() + ".";
            }
            return mType->nameDescription + ".";
        }

I use OTX SERVER 2 ~ 8.60
 
should be if (summon) not creature no?
Post automatically merged:

and creature* creature = getMaster() should be this->getMaster() im pretty sure inside the return
 
why cant we use this-> in this scenario since we are pointing to itself? e.g the object being looked on?
 
Back
Top