mIRC Homepage

/elseif not reporting error

Posted By: Wims

/elseif not reporting error - 12/09/10 05:36 PM

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
Posted By: Voglea

Re: /elseif not reporting error - 13/09/10 02:33 AM

if (1) {
if (1) echo ok
}

OR

if (1) echo ok
elseif (1) echo ok
Posted By: Wims

Re: /elseif not reporting error - 13/09/10 05:50 AM

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
Posted By: Khaled

Re: /elseif not reporting error - 13/09/10 09:29 AM

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.
Posted By: Wims

Re: /elseif not reporting error - 06/07/19 07:09 PM

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.
Posted By: Raccoon

Re: /elseif not reporting error - 06/07/19 08:06 PM

But it's been this way for 2 decades now.

Nice necro, tho! smile
Posted By: Wims

Re: /elseif not reporting error - 06/07/19 08:55 PM

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!
Posted By: Protopia

Re: /elseif not reporting error - 06/07/19 09:04 PM

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.
Posted By: Raccoon

Re: /elseif not reporting error - 07/07/19 08:03 AM

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
Posted By: Protopia

Re: /elseif not reporting error - 07/07/19 08:36 AM

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.
Posted By: Wims

Re: /elseif not reporting error - 07/07/19 12:24 PM

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)?
Posted By: Protopia

Re: /elseif not reporting error - 07/07/19 12:38 PM

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.
Posted By: Wims

Re: /elseif not reporting error - 07/07/19 03:01 PM

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"
Posted By: Protopia

Re: /elseif not reporting error - 07/07/19 03:07 PM

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.
Posted By: maroon

Re: /elseif not reporting error - 07/07/19 03:08 PM

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.
Posted By: Protopia

Re: /elseif not reporting error - 07/07/19 03:34 PM

True.
Posted By: Wims

Re: /elseif not reporting error - 07/07/19 04:39 PM

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.
© 2019 mIRC Discussion Forums