Message from TXT Document not be displayed

Paste Your code(s) here, and state your problem.

Message from TXT Document not be displayed

Postby jonlar » Mon Jul 14, 2008 4:42 pm

Hi i have a script in msl wich should post some message in different chans but its not working.

alias advertise2 {
msg #chan $read(advertise.txt)
msg #chan $read(advertise.txt)
Comment: The Upper part is not working and i dont know why######
If i make it this way...
msg #chan my Text to be posted
msg #chan my Text to be posted - ...it works

}
on *:TEXT:advon:?: {
if (!%checkzwei) {
timerzwei 0 1200 advertise2 - I also would like to put the Timer direktly in the msg Text, so i can set different Times and get not G-lined
set %checkzwei 2
}
else {
notice SOmeNickName Time is already started
}
}
}

on *:TEXT:advoff:?: {
if ($nick == Some NickName) {
timerzwei off
unset %checkzwei
timer 1 3 notice SomeNickName Timer off
}
else { notice $nick U are not allowed to use this Command
}
}
jonlar
 

Re: Message from TXT Document not be displayed

Postby Dandy » Mon Jul 14, 2008 5:17 pm

$read unless given, reads a random line from a file, make sure you don't have any empty lines.
Dandy
 

Re: Message from TXT Document not be displayed

Postby Lukemob » Tue Jul 15, 2008 10:05 am

Or check for them in this way:

Code: Select all
msg #chan $iif($read(advertise.txt) != $null,$read(advertise.txt),This line is empty)
Lukemob
 

Re: Message from TXT Document not be displayed

Postby jonlar » Tue Jul 15, 2008 11:57 am

Thx. But what do u mean with the Red marked

msg #chan $iif($read(advertise.txt) != $null,$read(advertise.txt),This line is empty)


and is it possible to set the Timers directly like this way

timerSOMETHING 0 900 msg #chan $iif($read(advertise.txt) != $null,$read(advertise.txt),......
timerSOMETHING2 0 1200 .....
jonlar
 

Re: Message from TXT Document not be displayed

Postby SilverRain » Tue Jul 15, 2008 6:37 pm

alias sendadvert msg $1 $iif($read(advertise.txt),$v1)
timerSOMETHING 0 900 /sendadvert #chan
SilverRain
 

Re: Message from TXT Document not be displayed

Postby jonlar » Tue Jul 15, 2008 11:34 pm

Ahh thats it. Thx man
jonlar
 


Return to Mirc Scripting Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron