The function Ord() only works with ordinal types, like Char. However you've declared type 'tab' to be array of string, which is not ordinal.
You use some concatenation in the array elements so I'll tell you to keep them as string, and when using Ord() access just the first character (which I guess it's the valid one, I've not bothered to follow your program logic) using index [1]:
if (ord(t[i][1]))=(ord(t2[i][1])+3) then