OneSignal Logic Error

how can i do this get the int value of the string first then compare it with the integer

i saw this tutorial