NOTICE is a command, as you can see with:
/help /notice
So you shouldn't see that error unless you have a badly written alias to replace it, or you typed it badly. Type this in any window:
//notice $me test
This should send a message to yourself. If you still get "unknown command" check to see if you've somehow created an alias of the same name:
//echo -a $isalias(notice) $isalias(notice).fname
If it says $false then you haven't replaced /notice with an alias, but if it says $true, it also shows you which file contains that alias. It's possible for the right combination of lines following a missing/extra curly-bracket in aliases.ini to confuse mIRC into thinking you've created an alias for something.
---
If your list is short enough, an easy way to detect duplicates is a %variable that can have max length of around 4000 before getting an error, so probably around 300-400 users. It's simplest to have the tokens separated by the space character, ASCII 32.
set %userslist $addtok(%userslist,$nick,32)
if someone changes their nick while in channel and you want the list to contain the new nick:
set %userslist $reptok(%userslist,$nick,$newnick,1,32)
You can't writeini without writing something, regardless whether the 'item' already exists in the .ini, so you could either write 0 or $false to it. or use remini to delete a section or item.