mIRC Homepage
Posted By: toenie aliases same as identifer($)? - 05/12/04 05:08 PM
When I was chatting, and testing some $'s, I found a bug.

Example:
When you have this line in your aliases:
Code:
/think /say I'm thinking 


And you say in a chatroom:
Quote:
//echo -a $think


You will get an error ("* /echo: insufficient parameters") BUT it will activate the alias /think too.

Quote:
Quote:
<toenie> I'm thinking
* /echo: insufficient parameters


Greetings,

toenie
Posted By: FiberOPtics Re: aliases same as identifer($)? - 05/12/04 05:13 PM
No bug.

$think isn't evaluated to anything, so mIRC tries to /echo a $null, which results, as it has always been, in * /echo: insufficient parameters.

Try this:

//echo -a $null
//echo -a $chr(32)

Greets
Posted By: toenie Re: aliases same as identifer($)? - 05/12/04 05:20 PM
I know, but it isn't only an error, it says "I'm Thinking" too.

Try:
Add this in your aliases:
/sometest /say aaaa, this is a test

And type in a chatroom:
//echo -a $sometest
Posted By: ailin Re: aliases same as identifer($)? - 05/12/04 06:10 PM
yes, there is no distinction between custom aliases and custom identifiers
Posted By: dJabba Re: aliases same as identifer($)? - 05/12/04 07:14 PM
thats what the $isid identifier is for, to check what its called like cool
Posted By: Sephiroth_ Re: aliases same as identifer($)? - 05/12/04 08:52 PM
It works as it should smile

Try this:
Code:
alias think {
  if ($isid) return I'm thinking
  else say I'm thinking
}
Posted By: jinkx Re: aliases same as identifer($)? - 06/12/04 07:16 PM
you're obviously new to scripting wink

an alias called by $ will execute all the commands in an alias
the $ prefix is used incase you want to use evaluate something in a different alias and return something

hence why the first reply used $isid and the /return prefix

the BEST help file i've ever seen is the one written for mIRC
if you want to script i HIGHLY recommend you read it
and play with it
it was the best 3 hours i spent.
it dosnt take very long to read it
in your case i suggest you start with /help aliases

it explains the $ prefix, also how exactly aliases work
Posted By: toenie Re: aliases same as identifer($)? - 07/12/04 03:43 PM
Quote:
you're obviously new to scripting wink

No, I am scripting a year of 2.

Quote:
an alias called by $ will execute all the commands in an alias
the $ prefix is used incase you want to use evaluate something in a different alias and return something

hence why the first reply used $isid and the /return prefix

Okay, thanks

Quote:
the BEST help file i've ever seen is the one written for mIRC
if you want to script i HIGHLY recommend you read it.

I agree smile

Quote:
and play with it
it was the best 3 hours i spent.
it dosnt take very long to read it
in your case i suggest you start with /help aliases

it explains the $ prefix, also how exactly aliases work


Sorry, I hasn't read the $ prefix help wink

(My English isn't my best language, but I am learning it grin )
© mIRC Discussion Forums