Accessing another Gem's RequestBus returns an error

I currently have two gems, one is similar to the spawner component but with a lot of other game specific functionality and the second is for a game object called “Crystal”. I’ve set up the CrystalRequestBus with a test function which is overridden in the Crystal component class like so:

virtual bool isCrystal() = 0;

In the Crystal header file, I overrode this function with:

bool isCrystal() override {return true;}

In my first Gem, I added the second Gem’s include folder to the build path, included the Crystal Request Bus header file, and am now trying to call this function on a set of stored EntityIds through the Crystal Gem’s Request Bus the following:

bool objIsCrystal = false; EBUS_EVENT_ID_RESULT(objIsCrystal, entityIds[i],Collectibles::CrystalRequestBus, isCrystal);

The problem is, this line is highlighted in Visual Studio 2015 with the following error:

Error (active) no instance of overloaded function “AZ::EBus<Interface, BusTraits>::EventResult [with Interface=Collectibles::CrystalRequests, BusTraits=Collectibles::CrystalRequests]” matches the argument list

I’m not entirely sure how to resolve this issue…

I think I found the issue… It turns out I made a dumb mistake of not providing an entity ID when connecting to the bus.

Glad you were able to figure it out. Remember, there are no mistakes, only happy accidents. :wink: