• 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++] I need convert this code for 0.3.6 pl1

yep, i got an error in this part:

# goto creatureevent.h :

after this
[cpp]
CreatureEvent* getEventByName([/cpp]
paste this

[cpp]std::vector<CreatureEvent*> getAllCreatureEvents(){return m_creatureEvents;}[/cpp]

the errors are:
Code:
||=== TheForgottenServer, default ===|
D:\Server Sources\creatureevent.h|76|error: expected ')' before '{' token|
D:\Server Sources\creatureevent.h|76|error: expected unqualified-id before 'bool'|
D:\Copia (3) de Server Sources\creatureevent.h||In member function 'CreatureEvent* CreatureEvents::getEventByName(std::vector<CreatureEvent*, std::allocator<CreatureEvent*> > (*)())':|
D:\Server Sources\creatureevent.h|76|error: cannot convert 'std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, CreatureEvent*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, CreatureEvent*> > >' to 'CreatureEvent*' in return|
||=== Build finished: 3 errors, 0 warnings ===|
 
Last edited:
this is the code
[cpp]CreatureEvent* getEventByName(const std::string& name, bool forceLoaded = true); < line 75
[/cpp]

i get the error when i add thus:

[cpp]CreatureEvent* getEventByName(std::vector<CreatureEvent*> getAllCreatureEvents(){return m_creatureEvents;}[/cpp]

and when i add thus:
[cpp]CreatureEvent* getEventByName(const std::string& name, bool forceLoaded = true);
std::vector<CreatureEvent*> getAllCreatureEvents(){return m_creatureEvents;}[/cpp]

i don't know what's the correct way to add it
 
i get the error when i add thus:

C Code:
Code:
CreatureEvent* getEventByName(std::vector<CreatureEvent*> getAllCreatureEvents(){return m_creatureEvents;}

you have an extra ( after getAllCreatureEvents
 
Back
Top