mIRC Home    About    Download    Register    News    Help

Print Thread
/if error with no line number #257593 24/04/16 10:24 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline OP
Hoopy frood
OP Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
In the case where someone writes an event similar to this one:

Code:
on *:TEXT:*:?:if (0) {
  noop
}

mIRC reports that no close bracket was found, but does not specify the line number.

Furthermore, if the 0 is changed to a 1 then the code in the block will not be executed anyway. If this arrangement is not meant to be supported, perhaps a different error message could be added to cover both cases, complete with line number?

Edit:
Saturn pointed out that errors in one-line events don't give line numbers under any circumstances. For example, both:

Code:
on *:TEXT:*:?:echo -a

and

Code:
on *:TEXT:*:?:{ echo -a }

simply report "/echo: insufficient parameters".

Last edited by Collective; 24/04/16 10:28 AM. Reason: more information
Re: /if error with no line number [Re: Collective] #258209 18/06/16 11:23 AM
Joined: Dec 2002
Posts: 4,519
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,519
Thanks, the issue with errors not showing line numbers for single-line events should be fixed in the next version.