mIRC Home    About    Download    Register    News    Help

Print Thread
Error with if command. #254922 09/09/15 09:01 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
So I am probably stupid, but For some reason my simple test script is not working here is the code >:
Code:
on *:text:!mod:#: {
  	if ($nick == bob) {
    msg $chan working
  }
  else msg $chan nope
}


In the main panel where it shows the errors it says >: "IF Unknown command"


Any help would be appreciated :3

Re: Error with if command. [Re: michaelukz] #254925 09/09/15 09:28 PM
Joined: Mar 2014
Posts: 42
S
Sjoepele Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: Mar 2014
Posts: 42
If this works then i think indentation was the problem? im not sure

Code:
on *:text:!mod:#: {
  if ($nick == bob) {
    msg $chan working
  }
  else msg $chan nope
}

Re: Error with if command. [Re: Sjoepele] #254926 09/09/15 09:29 PM
Joined: Sep 2015
Posts: 18
R
REDxPHOEN Offline
Pikka bird
Offline
Pikka bird
R
Joined: Sep 2015
Posts: 18
What is this ment to do?


Code:
 $I.am.REDxPHOEN 

Code:
 $I.am.THE.one.AND.only 

Code:
 $I.am.THE.best 
Re: Error with if command. [Re: REDxPHOEN] #254927 09/09/15 09:32 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
It's a test script to test certain parts of my scripts and then I found an issue with if's which worries me because most of my scripts act that way haha

Re: Error with if command. [Re: michaelukz] #254928 09/09/15 09:36 PM
Joined: Jan 2004
Posts: 1,302
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,302
You have a tab character in the script, mIRC does not handle these.

Re: Error with if command. [Re: Loki12583] #254930 09/09/15 09:46 PM
Joined: Dec 2014
Posts: 68
M
michaelukz Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
There are no spaces / tabs - When I use the "check brackets" Tool, it spaces things for me?

Re: Error with if command. [Re: michaelukz] #254931 09/09/15 09:55 PM
Joined: Sep 2015
Posts: 18
R
REDxPHOEN Offline
Pikka bird
Offline
Pikka bird
R
Joined: Sep 2015
Posts: 18
It doesnt do everything though. sometimes it misses things out. Just saying


Code:
 $I.am.REDxPHOEN 

Code:
 $I.am.THE.one.AND.only 

Code:
 $I.am.THE.best