You're using the wrong syntax for $read, and then using the if() statement backwards. In effect, you're telling mIRC to display a message that the name is NOT there when the if (condition) evaluates as $true, but say the name IS there when if (condition) evaluates evaluates as $false. Your invalid syntax is using only 2 parameters, so $read assumes the 2nd parameter is the line number, but $calc(text name) is zero, so your results will be unpredictable. Some not-there names will return $null, other not-there names return a random line each time. But every name that's in the file should be returning a random name from the list.
You should get in the habit of using the n and t switch always, unless you specifically want the behavior caused by their absence. In your case, after you flip the messages for the $true and $false conditions, you should either use switch w to return the entire line for wildcard case-insensitive match of entire line vs the match pattern Coco, or use switch s to scan for line whose first word is exact match with Coco, but that returns the remainder of the line which is always $null, but you can then use $readn which contains the line number matched.
You should read the /help examples for $read for how to use $read properly, and if you need additional examples, check out the $read page at
https://en.wikichip.org/wiki/mirc/identifiers/$read