Cannot get AddDynamic to work

I am new to UE4 and I am following the first person shooter tutorial and it says to have this line of code CollisionComponent->OnComponentHit.AddDynamic(this, &AAmmo::OnHit);
However, I get a red line under the “.” before AddDynamic and in the error window in visual studio, I get this(See Picture)
link text

I don’t know what to do and if there is another way to do this

I have the same problem:


h file
UFUNCTION() void TriggerEnter(
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);


cpp file
Root->OnComponentBeginOverlap.AddDynamic(this, &AMyActor::TriggerEnter);


error
…MyActor.cpp:16:35: No matching member function for call to '__Internal_AddDynamic’

Root->OnComponentBeginOverlap.AddDynamic(this, &AMyActor::TriggerEnter);

I found solution!
Maybe you have same problem

The error seems to go away after i copied the text from the link(See pictures)
however I am now getting another error in which you can see in the picture.
I am an administrator so IDK why I am getting an error like that
http://i.imgur.com/wqOQHGA.png

I am not sure, but I think that mixed order of parameters.

try this one
UFUNCTION() void OnHit(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);

and delete all other

sorry for late reply but I tried it and I got these errors instead