mIRC Homepage
Posted By: Anonymous My Scripting Style - 01/05/03 05:54 PM
I'm not sure if I posted this question in the right forum, but I hope I did.
First I must explain that I make very much PHP scripts, so I'm kind of used to it. Now I tried to script the same way in mIRC, but it didn't work. Now I am talking about the style, not the syntax off course. In PHP I would script a function like this:

Code:
function Cheese ( $Color )
{
      echo "I am eating a $Color colored piece of cheese";
}


So I tried this as follows in mIRC, but i did not work:

Code:
alias Cheese
{
      me is eating a $1 colored piece of cheese
}


Can this be implemented in a later version or something, because I thing there are lots of other programmers/scripters who just like to script this way?

Bye,
~ t0mas
Posted By: keeker Re: My Scripting Style - 01/05/03 07:23 PM
Quote:

alias Cheese
{
me is eating a $1 colored piece of cheese
}


try this:
Code:
alias Cheese {
me is eating a $1 colored piece of cheese
}


this works. just type: /cheese <insert wacky color here>
like /cheese pink
Posted By: codemastr Re: My Scripting Style - 02/05/03 08:09 PM
mIRC is super strict with syntax. I agree, according to just about all modern programmers, the opening brace goes on a seperate line, I would love to see mIRC support this. The only spec I've ever seen that says otherwise is the K&R C spec, but that is so outdated it isn't even funny...
Posted By: KingTomato Re: My Scripting Style - 02/05/03 08:38 PM
alias blah $&
{
/blah soemthing with parameters
}

?
© mIRC Discussion Forums