mIRC Home    About    Download    Register    News    Help

Print Thread
/elseif not reporting error #225887 12/09/10 05:36 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
Code:
alias test {
if (1) {
  elseif (1) echo -a really?
 }
}
calling /elseif without any if before should really report an error, same for /else of course

Last edited by Wims; 12/09/10 05:58 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /elseif not reporting error [Re: Wims] #225905 13/09/10 02:33 AM
Joined: Nov 2009
Posts: 81
V
Voglea Offline
Babel fish
Offline
Babel fish
V
Joined: Nov 2009
Posts: 81
if (1) {
if (1) echo ok
}

OR

if (1) echo ok
elseif (1) echo ok

Re: /elseif not reporting error [Re: Voglea] #225909 13/09/10 05:50 AM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
The point is that using elseif or else alone isn't reporting an error which is sort of a big problem, mIRC should not silently ignore this case


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /elseif not reporting error [Re: Wims] #225917 13/09/10 09:29 AM
Joined: Dec 2002
Posts: 4,521
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,521
This feature has behaved this way ever since if/elseif/else support was added over a decade ago. Fixing it will require changes to core scripting routines. I will add this to the to-do list for a future version.

Re: /elseif not reporting error [Re: Khaled] #265693 06/07/19 07:09 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
Hello,

This situation happened to me again (too much copy/pasting) and it took some tries once again to figure it out, I'd really like to get yelled at in this case.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /elseif not reporting error [Re: Wims] #265694 06/07/19 08:06 PM
Joined: Feb 2003
Posts: 2,642
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,642
But it's been this way for 2 decades now.

Nice necro, tho! smile


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: /elseif not reporting error [Re: Raccoon] #265695 06/07/19 08:55 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
the duration for which it has been wrong doesn't matter, it's wrong on so many level to silently ignore in this case, one could argue it's purposefuly misleading scripters!


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /elseif not reporting error [Re: Wims] #265696 06/07/19 09:04 PM
Joined: Aug 2003
Posts: 236
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 236
Originally Posted by Wims
the duration for which it has been wrong doesn't matter, it's wrong on so many level to silently ignore in this case, one could argue it's purposefully misleading scripters!


Personally I think that is a bit unfair. It's at worst a bug - and one that has not had a comment for 9 years at that so it can't be that heinous a problem.

Re: /elseif not reporting error [Re: Wims] #265698 07/07/19 08:03 AM
Joined: Feb 2003
Posts: 2,642
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,642
mIRC has never made any attempt or claims to attempt to validate for poor coding and invalid syntax. Follow instructions and ask users for help if you don't understand basic programming precepts. mIRC does not contain an IDE (integrated development environment) so you are on your own bud. smile

Last edited by Raccoon; 07/07/19 08:03 AM.

Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: /elseif not reporting error [Re: Raccoon] #265699 07/07/19 08:36 AM
Joined: Aug 2003
Posts: 236
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 236
Originally Posted by Raccoon
mIRC has never made any attempt or claims to attempt to validate for poor coding and invalid syntax. Follow instructions and ask users for help if you don't understand basic programming precepts. mIRC does not contain an IDE (integrated development environment) so you are on your own bud. smile


I have created a set of language definitions for Notepad++ to highlight reserved words which I am happy to share if anyone is interested - but it will not pick up this error.

On my to do list is to create a better syntax highlighter / checker for Visual Studio Code. Happy to be part of or lead a team on this.

Re: /elseif not reporting error [Re: Raccoon] #265702 07/07/19 12:24 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
The author indirectly stated it's an issue by adding it to the list of thing to add/fix, what's there to talk about (your taunts are like water drop on my K-way)?


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /elseif not reporting error [Re: Wims] #265704 07/07/19 12:38 PM
Joined: Aug 2003
Posts: 236
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 236
Yes - it's an issue. No one is denying that. It just doesn't seem like a particularly important one given the lack of complaints in this thread for 9 years.

And who is taunting you? I don't see any taunts.

Re: /elseif not reporting error [Re: Protopia] #265707 07/07/19 03:01 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
It just doesn't seem like an important problem to you, for me it's very important and that's why I choose to bump the thread. It's not urgent but the fact that nobody ever re-reported this may indicate that the scripting scene is decreasing rather than the scripting scene not caring about it.
Raccoon is taunting with "Follow instructions and ask users for help if you don't understand basic programming precepts"


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: /elseif not reporting error [Re: Wims] #265708 07/07/19 03:07 PM
Joined: Aug 2003
Posts: 236
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 236
No - I realise that it caused you some inconvenience because it was a difficult issue to track down.

And yes - mIRC scripting has passed its hay day. Not because IRC usage has declined (which it might have since there are many other chat applications these days), but also because many people access from Android and so the proportion of mIRC users has declined too.

But another part of the reason it has declined is because you have to keep reinventing the wheel. We need something equivalent to Node's NPM or Python's PIP - whereby you can use packaged functionality easily from your own scripts.

I have a concept in mind for this - but currently on hold until I have more time.

Re: /elseif not reporting error [Re: Protopia] #265709 07/07/19 03:08 PM
Joined: Jan 2004
Posts: 1,180
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,180
The lack of complaints could be due to the necro thread having ended with this being put onto the todo list. Just because there's no comments to a thread doesn't mean there's not a lack of interest for it. So if they post soon after it's put onto the todo list, they get yelled at for not giving any time for it to be added, but if they wait too long then that's lack of interest. What's the appropriate time to wait for these items, so we know when to put it on our calendar?

For example, THIS thread has no replies to it in the nearly 2 years since "/color text 64" syntax was put onto the todo list, but it's a common request in several channels I've been in.

Re: /elseif not reporting error [Re: maroon] #265711 07/07/19 03:34 PM
Joined: Aug 2003
Posts: 236
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 236
True.

Re: /elseif not reporting error [Re: maroon] #265714 07/07/19 04:39 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
Quote
So if they post soon after it's put onto the todo list, they get yelled at for not giving any time for it to be added, but if they wait too long then that's lack of interest. What's the appropriate time to wait for these items, so we know when to put it on our calendar?
Lol, in practice this is not the result of people waiting, 9 years is definitely too long. It's easy to understand why this hasn't been dealt with and was forgotten, it's also easy to post a reminder, no harm.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net