The type is a bit mask, so you should be using & operator instead of >=. Now you can also skip all the nonsense with subtracting numbers.
%type = ...
%str = "";
if(%type & $TypeMasks::TerrainObjectType)
%str = %str SPC "Terrain";
if(%type & $TypeMasks::FxBrickObjectType)
%str = %str SPC "Brick";
...
if(%str !$= "")
messageClient(%client, '', "matched types:" @ %str);