I've tried to use this in my 0.4 sources:
Feature - [CreatureEvent] OnSpawn(cid)
But it's not compiling...
Showing me this errors:
creatureevent.cpp
hastebin
creatureevent.h
hastebin
monster.cpp
hastebin
Feature - [CreatureEvent] OnSpawn(cid)
But it's not compiling...
Showing me this errors:
Code:
creatureevent.cpp: In member function ‘uint32_t CreatureEvent::executeOnSpawn(Creature*)’:
creatureevent.cpp:2045:7: error: could not convert ‘((CreatureEvent*)this)->CreatureEvent::<anonymous>.Event::m_scriptData’ from ‘std::__cxx11::string {aka std::__cxx11::basic_string<char>}’ to ‘bool’
if(m_scriptData)
^
creatureevent.cpp:2046:21: error: no match for ‘operator*’ (operand type is ‘std::__cxx11::string {aka std::__cxx11::basic_string<char>}’)
scriptstream << *m_scriptData;
^
In file included from /usr/include/boost/detail/container_fwd.hpp:98:0,
from /usr/include/boost/functional/hash/extensions.hpp:22,
from /usr/include/boost/functional/hash/hash.hpp:558,
from /usr/include/boost/functional/hash.hpp:6,
from /usr/include/boost/regex/v4/basic_regex.hpp:23,
from /usr/include/boost/regex/v4/regex.hpp:67,
from /usr/include/boost/regex.hpp:31,
from otpch.h:36,
from creatureevent.cpp:17:
/usr/include/c++/5/complex:404:5: note: candidate: template<class _Tp> std::complex<_Tp> std::operator*(const _Tp&, const std::complex<_Tp>&)
operator*(const _Tp& __x, const complex<_Tp>& __y)
^
/usr/include/c++/5/complex:404:5: note: template argument deduction/substitution failed:
creatureevent.cpp:2046:22: note: candidate expects 2 arguments, 1 provided
scriptstream << *m_scriptData;
^
In file included from /usr/include/boost/detail/container_fwd.hpp:98:0,
from /usr/include/boost/functional/hash/extensions.hpp:22,
from /usr/include/boost/functional/hash/hash.hpp:558,
from /usr/include/boost/functional/hash.hpp:6,
from /usr/include/boost/regex/v4/basic_regex.hpp:23,
from /usr/include/boost/regex/v4/regex.hpp:67,
from /usr/include/boost/regex.hpp:31,
from otpch.h:36,
from creatureevent.cpp:17:
/usr/include/c++/5/complex:395:5: note: candidate: template<class _Tp> std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const _Tp&)
operator*(const complex<_Tp>& __x, const _Tp& __y)
^
/usr/include/c++/5/complex:395:5: note: template argument deduction/substitution failed:
creatureevent.cpp:2046:22: note: ‘std::__cxx11::string {aka std::__cxx11::basic_string<char>}’ is not derived from ‘const std::complex<_Tp>’
scriptstream << *m_scriptData;
^
In file included from /usr/include/boost/detail/container_fwd.hpp:98:0,
from /usr/include/boost/functional/hash/extensions.hpp:22,
from /usr/include/boost/functional/hash/hash.hpp:558,
from /usr/include/boost/functional/hash.hpp:6,
from /usr/include/boost/regex/v4/basic_regex.hpp:23,
from /usr/include/boost/regex/v4/regex.hpp:67,
from /usr/include/boost/regex.hpp:31,
from otpch.h:36,
from creatureevent.cpp:17:
/usr/include/c++/5/complex:386:5: note: candidate: template<class _Tp> std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const std::complex<_Tp>&)
operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
^
/usr/include/c++/5/complex:386:5: note: template argument deduction/substitution failed:
creatureevent.cpp:2046:22: note: ‘std::__cxx11::string {aka std::__cxx11::basic_string<char>}’ is not derived from ‘const std::complex<_Tp>’
scriptstream << *m_scriptData;
^
Makefile:547: recipe for target 'creatureevent.o' failed
make[1]: *** [creatureevent.o] Error 1
creatureevent.cpp
hastebin
creatureevent.h
hastebin
monster.cpp
hastebin