but when I compile it says âerror C2065: âHealthtoAddâ: undeclared identifierâ
why does it has this error? Have I not declared it correcty in the header file ? The HealthStation_Master derived from the Interact_Master Class
Im completely new to c++ so I dont know if I have shared enough info to have an answer. I can provide more info if needed.
Thanks
Your âHealthtoAddâ variable belongs to the AHealthStation_Master class, and not to the AInteractable_Master. You are implementing the method InteractWith_Implementation of the latter and not the former, so of course the method canât see the variable which belongs to another child class.
You should probably have the method InteractWith_Implementation implemented for AHealthStation_Master (and NOT AInteractable_Master)