Getting short mod name via Legacy CPP interface
Moderators: hoijui, Moderators
Getting short mod name via Legacy CPP interface
I have looked into Spring master source code and haven't found any GetShortModName() API function. Does it mean GetModName() body will be changed? I wanna be sure, because i definitely want to avoid AAI's problems when config file is not found for brand new mod version.
Re: Getting short mod name via Legacy CPP interface
Thank you. I really appreciate your work though i can't provide you a desired harem. Only improved versions of AI 

Re: Getting short mod name via Legacy CPP interface
:D
well.. as you possibly saw, with the recent changes, it is now not a lot of work anymore, to put one function into the legacy wrapper, if it is already in the C Interface.
last weekend was a good one for me. even doh i did not meet a harem, it was good (i met some real people, most of which i had not seen before, and there were 50% girls! :O )

i tried compiling latest E323AI master on spring master under linux, and got these compile errors:
sorry, i know this is not the best place to put it, but i am lazy right now 
i have never used C++ generics/templates or what it is called, have no idea what could be the problem here.
well.. as you possibly saw, with the recent changes, it is now not a lot of work anymore, to put one function into the legacy wrapper, if it is already in the C Interface.
last weekend was a good one for me. even doh i did not meet a harem, it was good (i met some real people, most of which i had not seen before, and there were 50% girls! :O )

i tried compiling latest E323AI master on spring master under linux, and got these compile errors:
Code: Select all
In file included from AI/Skirmish/E323AI/Util.cpp:10:
AI/Skirmish/E323AI/Util.hpp: In function 'std::set<T, std::less<_Key>, std::allocator<_CharT> > util::IntersectSets(const std::set<T, std::less<_Key>, std::allocator<_CharT> >&, const std::set<T, std::less<_Key>, std::allocator<_CharT> >&)':
AI/Skirmish/E323AI/Util.hpp:39: error: expected `;' before 'sit'
AI/Skirmish/E323AI/Util.hpp:41: error: 'sit' was not declared in this scope
AI/Skirmish/E323AI/Util.hpp: In function 'void util::GetShuffledKeys(std::vector<Key, std::allocator<_CharT> >&, std::map<Key, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >&)':
AI/Skirmish/E323AI/Util.hpp:62: error: expected `;' before 'it'
AI/Skirmish/E323AI/Util.hpp:63: error: 'it' was not declared in this scope
In file included from AI/Skirmish/E323AI/CLogger.cpp:11:
AI/Skirmish/E323AI/Util.hpp: In function 'std::set<T, std::less<_Key>, std::allocator<_CharT> > util::IntersectSets(const std::set<T, std::less<_Key>, std::allocator<_CharT> >&, const std::set<T, std::less<_Key>, std::allocator<_CharT> >&)':
AI/Skirmish/E323AI/Util.hpp:39: error: expected `;' before 'sit'
AI/Skirmish/E323AI/Util.hpp:41: error: 'sit' was not declared in this scope
AI/Skirmish/E323AI/Util.hpp: In function 'void util::GetShuffledKeys(std::vector<Key, std::allocator<_CharT> >&, std::map<Key, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >&)':
AI/Skirmish/E323AI/Util.hpp:62: error: expected `;' before 'it'
AI/Skirmish/E323AI/Util.hpp:63: error: 'it' was not declared in this scope
In file included from AI/Skirmish/E323AI/CUnitTable.cpp:11:
AI/Skirmish/E323AI/Util.hpp: In function 'std::set<T, std::less<_Key>, std::allocator<_Tp1> > util::IntersectSets(const std::set<T, std::less<_Key>, std::allocator<_Tp1> >&, const std::set<T, std::less<_Key>, std::allocator<_Tp1> >&)':
AI/Skirmish/E323AI/Util.hpp:39: error: expected `;' before 'sit'
AI/Skirmish/E323AI/Util.hpp:41: error: 'sit' was not declared in this scope
AI/Skirmish/E323AI/Util.hpp: In function 'void util::GetShuffledKeys(std::vector<_Tp, std::allocator<_Tp1> >&, std::map<Key, T, std::less<_Key>, std::allocator<std::pair<const _Key, _Tp> > >&)':
AI/Skirmish/E323AI/Util.hpp:62: error: expected `;' before 'it'
AI/Skirmish/E323AI/Util.hpp:63: error: 'it' was not declared in this scope

i have never used C++ generics/templates or what it is called, have no idea what could be the problem here.
Re: Getting short mod name via Legacy CPP interface
LOL, i've just put LF after "template<typename T>".
Re: Getting short mod name via Legacy CPP interface
i tired removing that, but it did not help.
the template stuff seems to work in general, only fails for set::const_iterator ans set::iterator.
the template stuff seems to work in general, only fails for set::const_iterator ans set::iterator.
Re: Getting short mod name via Legacy CPP interface
Comment it out temporarily. Leave RemoveWhiteSpaceInPlace(), GetAbsFileName() and GetShuffledKeys().
Re: Getting short mod name via Legacy CPP interface
i fixed it (and committed to your repo).
the solution is.. well... C++ live!
i had to change this:
to this:
the solution is.. well... C++ live!
i had to change this:
Code: Select all
std:set<T>::iterator it;
Code: Select all
typename std:set<T>::iterator it;
Re: Getting short mod name via Legacy CPP interface
T is already typenamed: template<typename T>. Strange. I expected the source of this problem is GetShuffledKeys() only.