mIRC Home    About    Download    Register    News    Help

Print Thread
#152603 03/07/06 11:17 AM
Joined: Sep 2003
Posts: 38
S
snabbi Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 38
Today I discovered that the following code does not work in mIRC 6.17

on *:part:%room : { echo -s test }

When I replace %room with the actual roomname it does work. Thus it seems like it doesn't replace the variablename with its value.

However,
on *:join:%room { echo -s test }
does work.

*Workaround could be
on *:part:*: {
if ( !$istok(%room,$chan,44) ) { return }
echo -s test
}

Last edited by snabbi; 03/07/06 11:43 AM.
#152604 03/07/06 11:26 AM
Joined: Jul 2004
Posts: 31
H
Ameglian cow
Offline
Ameglian cow
H
Joined: Jul 2004
Posts: 31
on *:part:%room: works perfectly fine here.. remove the space between the variable and the : i guess. nevertheless, on *:part:$(%room): will work aswell

/edit: your workaround is missing a closing } after the return.

#152605 03/07/06 11:27 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
It works fine here. If you use the code you posted here, your problem is a syntax error. You must not leave a space after the variable and before the colon:

on *:part:%room : <- wrong
on *:part:%room: <- right

You also have a syntax error in the on join example you posted. Although this one may be tolerated by mIRC, you should use the correct syntax.

on *:join:%room { code } <- wrong
on *:join:%room: { code } <- right


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#152606 03/07/06 11:41 AM
Joined: Sep 2003
Posts: 38
S
snabbi Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 38
Okay, seems to be the syntax error yes. The variable is replaced with the correct syntax and isn't replaced with the bad syntax. And it is tolerated at the on join.

I have always used the wrong syntax from 5.91 and just learned today that it was wrong. Sorry to disturb you.

PS
Though it does strike me that it is tolerated with the on join and it isn't tolerated at the on part.

#152607 03/07/06 11:44 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The space between the variable and the colon is not tolerated in on JOIN either.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard