mIRC script: parameters?

Discussion in 'Programming' started by jacobzcoool, Mar 9, 2010.

Share This Page

  1. jacobzcoool

    jacobzcoool Chav Hunter

    Joined:
    Oct 15, 2005
    Messages:
    5,447
    Likes Received:
    0
    I've been writing a few scripts recently, all working well enough, except for one:
    I want to write a remote script that runs when someone uses a command (such as !test) followed by a parameter (!test parameter1)

    Code:
    on *:TEXT:!test*:#:
    {
      //needs code here to store parameter1 in a variable
    
      //do some stuff
    }
    
    I'm looking for a way to get the message that caused the script to run, and then to store the parameter in a variable. Any help would be appreciated.
     
  2. Flanker

    Flanker Celtic Warrior

    Joined:
    Jan 12, 2012
    Messages:
    99
    Likes Received:
    0
    ok I did this years ago, but instead of on*:TEXT etc, I used it in a chat window hence on *:CHAT etc etc

    on *:CHAT:*:{

    if ($1 == command) {

    if ($2 == parameter1) { // Do some stuff }
    if ($3 == parameter2) { // Do some stuff }

    }

    }


    So...

    $1-