mIRC Homepage
Posted By: Bullseye unknown command: '1' - 30/03/08 06:42 PM
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
Posted By: hixxy Re: unknown command: '1' - 30/03/08 06:43 PM
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.
Posted By: Bullseye Re: unknown command: '1' - 30/03/08 06:48 PM
damn fast respond i didn't finish me edeting yet :P
But thank and i'll try it.
Posted By: hixxy Re: unknown command: '1' - 30/03/08 06:53 PM
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)
Posted By: DJ_Sol Re: unknown command: '1' - 31/03/08 07:02 PM
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...
Posted By: hixxy Re: unknown command: '1' - 31/03/08 07:17 PM
Which browser and version are you using?
Posted By: qwerty Re: unknown command: '1' - 31/03/08 07:30 PM
All versions of IE do that unfortunately (they appear to ignore the height of the hsbar in determining whether a vsbar should be displayed).
Posted By: Riamus2 Re: unknown command: '1' - 31/03/08 10:50 PM
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.
© mIRC Discussion Forums