mIRC Home    About    Download    Register    News    Help

Print Thread
My Scripting Style #21795 01/05/03 05:54 PM
Joined: May 2003
Posts: 3
T
t0maz Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: May 2003
Posts: 3
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

Re: My Scripting Style #21796 01/05/03 07:23 PM
Joined: Dec 2002
Posts: 204
K
keeker Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
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

Last edited by keeker; 01/05/03 07:25 PM.

keek: Scots - intr.v. keeked, keekˇing, keeks
To peek; peep.
Re: My Scripting Style #21797 02/05/03 08:09 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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...

Re: My Scripting Style #21798 02/05/03 08:38 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
alias blah $&
{
/blah soemthing with parameters
}

?


-KingTomato