I know I'm new at this but I am stuck on this..
When someone joins my channel a message will say that they joined and writes to a file to keep their name so when they rejoin the message correctly says user has rejoined..
This is for Twitch.tv for my channel

Code:
on *:JOIN:#amtraxtge:{
  var %person = $read(AMTraxTGE.txt)
  if (!$read(AMTraxTGE.txt,nw,$nick)) { 
    msg $chan $nick has joined! 
    write AMTraxTGE.txt $nick
  }
}
on *:JOIN:#amtraxtge:{
  var %person = $read(AMTraxTGE.txt)
  if (!$read(AMTraxTGE.txt,nw,$nick)) {
    msg $chan $nick has rejoined
  }
}


The code does not work after the second on *:JOIN:

Thanks,
AMTraxTGE