Code runs twice, when it shouldn't?!

Dear all,

when I use the following code, I get for some reason it gives me two lines of output. It seems, that it runs the Code twice, but I don’t know why?!

int Counter=0;
    
    void AClass::Tick(float DeltaTime)
    {
    	Super::Tick(DeltaTime);
    	++Counter;
    	RandNum = FMath::RandRange(0, 1);
    
    	if (Counter == 120)
    	{
    		
   		    UE_LOG(LogTemp, Warning, TEXT("Number= %i"), RandNum);
    	}
    
    }

Output:
LogTemp:Warning: Number= 1

LogTemp:Warning: Number= 0

Does it do that every frame or just the first time?

I should to it just once, as soon as “Counter==120” is true.

Is it possible you have two instances of the actor?

Change your log to look like this.

UE_LOG(LogTemp, Warning, TEXT("Number= %i %s"), RandNum, *GetNameSafe(this));

Ah ■■■■ it, you are right!
Thanks and sorry for bothering you for a stupid mistake like this!

Or shame on me, you are right! Thank you!