Lo estas usando mal, primero:
Te dije que lo usabas directmente desde MySQL
O usando mysql_num_rows().
No ambos al mismo tiempo, es un malgasto de recursos.
Te esta mostrando ese error porque tienes un error en tu consulta.
Código PHP:
$registros=mysql_query("select TimePrint, nick, Mensaje from tblMensajes WHERE Mensaje!='' ORDER BY IDMensaje DESC LIMIT 40",$conexion) or
die("Problemas en el select:".mysql_error());
$numero = mysql_num_rows($registros);
echo $numero."<br />\n";
while ($reg=mysql_fetch_array($registros))
{
$UN_SALTO="\r\n";
$DOS_SALTOS="\r\n\r\n";
echo urldecode($reg['TimePrint']).$UN_SALTO;
echo urldecode($reg['nick']).":".$UN_SALTO;
echo urldecode($reg['Mensaje']).$DOS_SALTOS;