I wrote this in TextureAtlas.cpp:
bool CTextureAtlas::TextureExists(string name)
{
if (textures.find(name) == textures.end) return false;
else return true;
}
I then tried to use it in ProjectileHandler.cpp:
if (textureAtlas->TextureExists("weapondeftexture") == true) weapondeftex = textureAtlas->GetTexture("weapondeftexture");
else wweapondeftex = textureAtlas->GetTexture("circularthingy");
But when I try to compile, I get:
rts\Sim\Projectiles\ProjectileHandler.cpp:135: error: no match for 'operator=='
in '((CProjectileHandler*)this)->CProjectileHandler::textureAtlas->CTextureAtlas
::TextureExists(string(((const char*)"weapondeftexture"), ((const std::allocator
<char>&)((const std::allocator<char>*)(&allocator<char>()))))) == true'
C:/Dev-Cpp/include/objbase.h:80: note: candidates are: BOOL operator==(const GUI
D&, const GUID&)
scons: *** [build\rts\Sim\Projectiles\ProjectileHandler.o] Error 1
scons: building terminated because of errors.