It works fine here, replace it with this and see if it echoes "$true", if it does then you have another script interfering with it:
On ^*:TEXT:*:#: {
echo -a $halted
}
Edit: That's assuming your script file is the last one loaded, otherwise you will have to check manually.