mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 15
J
jlb00h Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Feb 2003
Posts: 15
heres a snippet of my code(kinda):

on *:INPUT:*: {
if (*i like dogs* iswm $1-)
{say $chan cats are better }
}

it returns this:

* /if: 'like' unknown operator (line 2, script1.ini)

Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
try this

on *1:TEXT:*I like dogs*:#channel:/msg $chan Cats are better
}

Joined: Feb 2003
Posts: 15
J
jlb00h Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Feb 2003
Posts: 15
hey THEGAME
did ya watch all of thist Monday Night?
i thought Erick Bishov or whoever it was was gonna die... EEK
LOL

Joined: Feb 2003
Posts: 15
J
jlb00h Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Feb 2003
Posts: 15
on *1:TEXT:*: {
if (*i like dogs* iswm $1-)
{/msg $chan cats are better }
if (*how are you* iswm $1-) {
{/msg $chan im great, and you? }
if (*how old are you?* iswm $1-)
{/msg $chan 20 }
if (*!TEST* iswm $1-)
{/msg $chan this is just a auto-response test}
if (*Here's a hint* iswn $1-)
{/msg afk)
}



this is the full thing, but its not working

Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok remove the * around ur text ur wanting to match try it like that


D3m0nnet.com
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
  1. You are using both * and 1 (both are access level choices) - just use one or the other: 1 if you don't use any named levels or * if you do.
  2. You are not giving the on TEXT a target to check in: * (both query and any channel), ? (just in a query), # (only in any channel) or #namedChannel (just in that one channel or channel list).
  3. You are not leaving a space after the { and before the msg command: {msg or {/msg will not work.
  4. Your { starts on the next line but if (condition) requires it to be on the same line as the if for a multi-lined code block.
  5. Unless you want to check the same line for each possible condition, use elseif for the following conditional checks.
  6. Your final iswm is misspelled.
  7. Your final msg command has no target ($chan) to send the message to.
Code:

on *:TEXT:*:#:{
  if (*i like dogs* iswm $1-) msg $chan cats are better
  elseif (*how are you* iswm $1-) msg $chan im great, and you?
  elseif (*how old are you?* iswm $1-) msg $chan 20
  elseif (*!TEST* iswm $1-) msg $chan this is just a auto-response test
  elseif (*Here's a hint* iswm $1-) msg $chan afk
}

Or, if you prefer a multi-lined format:
Code:

on *:TEXT:*:#:{
  if *i like dogs* iswm $1- {
    msg $chan cats are better
  }
  elseif *how are you* iswm $1- {
    msg $chan im great, and you?
  }
  elseif *how old are you?* iswm $1- {
    msg $chan 20
  }
  elseif *!TEST* iswm $1- {
    msg $chan this is just a auto-response test
  }
  elseif *Here's a hint* iswm $1- {
    msg $chan afk
  }
}

Or even:
Code:

on *:TEXT:*:#:{
  if *i like dogs* iswm $1- {
    msg $chan cats are better
  } | elseif *how are you* iswm $1- {
    msg $chan im great, and you?
  } | elseif *how old are you?* iswm $1- {
    msg $chan 20
  } | elseif *!TEST* iswm $1- {
    msg $chan this is just a auto-response test
  } | elseif *Here's a hint* iswm $1- {
    msg $chan afk
  }
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard