How to check if the FName type variable is returning "2" ? C++

Hi, I Have a variable of type FName ID in the data table, and I want to check if this variable is returning the the row name in numbers, as I already have rows with names 1, 2, 3 etc…

what I am trying is :

if (ID != 2)
  {
  
  }

But I got error operand not match

Thank You.

you have 2 solutions.
1: Change the type from FName to int32.
2: if (ID != FName(TEXT("2"))) must be processed with the right format while you have the type FName.

Hope it help, cheers!

2 Likes

Thank You very very much for the fast and detailed explanation Sir :slight_smile: