simplicity commented on a Page, [OLD] Announce Script 1.0  -  Sep 14, 2007

This is moderate. There are a few errors I found though.

  1. $read(A.txt) will return a random line from your announcements. Try using this code:
var %x = 1
while (%x <= $lines(A.txt)) { 
 ; This line returns if the total number of lines in a text is more than 1
 .timer 1 2 msg $chan $read(A.txt,%x) | inc %x
 ; This line broadcasts to the channel the announcements with a timer. This is to prevent flooding. The $read(A.txt,%x) reads a specific line in the text. The %x varaible will add 1 to its current number each time. And until the events ends, it will keep on msging the channel with the %x line in the txt file.

Remove the ; comments if you end up using the code. I just wanted to explain what everything does. ;)

  1. There needs to be a space between the $read and the closing bracket.

  2. Remove the /\'s (not really an error). It\'s better coding that way. ;)

Other then that, nice idea. I recommend you add a feature to remove a specific line of text from the txt file.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.