Possible Maths bug? uint32 < 0....

The ‘u’ in ‘uint’, ‘uint8’, ‘uint32’ etc means that it’s unsigned.

Unsigned means that the integer has no ‘sign’, which basically means it’s always positive. If you try and take the value below 0, then the value will just wrap round to the maximum value (so 0-2000 will actually be the maximum possible value the integer can hold, minus 2000. Therefore it’s a positive value).

If you’re wondering why you’d ever use an unsigned integer, it’s because you don’t have to reserve bits for the signing of the number you can contain a much larger maximum value. Example cases are for highscores / counters etc which will never be a negative value but could grow to be quite large.