mIRC Home    About    Download    Register    News    Help

Print Thread
#197167 30/03/08 06:42 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
Hi,

I get this error: Unknown command: '1' while using this code:
Code:
on *:TEXT:*:*: {
  if ($me isin $1-) { 
    $tip(Name,Highlight, $+ $me Je bent genoemd in $chan om4 $timestamp ,7200)
  }
}


Why?

By the way i wanna let the tip look like this:

Highlight
Server:
Channel:
Time:
Text:

But how do i let the tip start with a new line?
The | sign doesn't work.

Greetings
Bullseye

Last edited by Bullseye; 30/03/08 06:46 PM.
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Because you're using an $identifier where mIRC expects a /command, so mIRC tries to execute the return value of the identifier as a command.

So if $tip() returns 1, then mIRC will try to execute /1

To fix this, use the /noop command before $tip():

Code:
on *:TEXT:*:*: {
  if ($me isin $1-) { 
    noop $tip(Name,Highlight, $+ $me Je bent genoemd in $chan om4 $timestamp ,7200)
  }
}


/noop simply does nothing. So it lets you evaluate the contents of whatever you pass to it without doing anything with the results.

Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
damn fast respond i didn't finish me edeting yet :P
But thank and i'll try it.

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Use $crlf to start a new line.

Code:
noop $tip(Name,Highlight, $+ $me Je bent genoemd in $chan om4 $timestamp $crlf new line 1 $crlf new line 2,7200)

Joined: Jan 2007
Posts: 1,155
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,155
This is why I use the quote tag for small code. All I see there is a horizontal scroll bar. Not even a link to expand the code...

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Which browser and version are you using?

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
All versions of IE do that unfortunately (they appear to ignore the height of the hsbar in determining whether a vsbar should be displayed).

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Yeah, when I do a one-line code that will need to scroll, I put an extra blank line at the bottom before the closing code tag. That makes it always possible to see the code. Of course, most people don't do that, so you're stuck hitting Quote to see it or else using another browser.


Link Copied to Clipboard