Can you post your script using the "code" keyword instead of "quote"? Either "quote" is destroying your code, or your code is defective.
Also, it's possible for your code to have a collision between timers if NICK and KNICK both join. Better is to use a character which cannot exist as the 1st character of the nick. For example change
timer $+ $nick
timerK $+ $nick
to
timerscriptname $+ $nick
timerscriptname0K $+ $nick
This change also prevents someone from deleting a different script's timer. if they know the name of the other script's timer, they can change to that nick before joining your channel, and that will stop the other script's timer.