Cannot apply operator '&' to r-value

ACannon::Reload() means calling the function. You need to pass function pointer to SetTimer(…).

So new code should be :

GetWorld()->GetTimerManager().SetTimer(ReloadTimer, this, &ACannon::Reload, 1/FireRate, false);

2 Likes