Well.. I think I found out why I was having troubles with this.
I generally use Try..Except to convert string -> integer. So, I'd do like:
try
int := strtoint(getpiece(text,' ',0));
except
writeln('error!');
exit;
end;
BUT, apparently, shoozza must have modified how StrToInt() works, because when it doesn't return a proper integer value, it returns "255". So, there would never be an exception to occur. I wonder why he did that, though.
Anyway, thanks!