1)
Code:
 on *:text:!subtract*:#:{
if $$2 < 1 || $$2 > 100 {
.msg $chan Sorry $nick The number must be between 1 and 100
}
else .msg $chan $calc(2000 - $$2)
}
 


Regarding your second code, it would probably be easier to fix what you have, rather than give something from scratch. Please post the code that you currently have. If the code has a lot more in it, than just this, then only post the relevant parts, and please remember to use the Code Tags