If you're going to use dialog -x in both if statements, why both? and if you have the target as 2,3 - you don't really need a if/if, if/else would be fine.. and you never need to use / in remotes...
on *:DIALOG:PM:SCLICK:2,3:{
dialog -x PM PM
if ($did == 2) {
query %pmnick PM Accepted!
}
else {
msg %pmnick I am sorry %pmnick $+ . I have chosen to deny your PM. If you continue to try to PM me I will /ignore you. Have a nice day!
.close -m %pmnick
}
}