mIRC Home    About    Download    Register    News    Help

Print Thread
Bugs already reported but not fixed #184030 24/08/07 06:49 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
1) When you trying to stick some text with $N like $1's, if text contain number, mirc cut the text :

Code:
//tokenize 32 Ga is Ga | echo -a $1_some_text /// $1_some1text


2) There is another strange thing :

Code:
//Echo -a $mid(text,1,2)Ga


This will echo "te" but i think it should return $mid(text,1,2)Ga since the $mid shouln't be evaluate and here :
Code:
//echo -a Ga$mid(text,1,2)

the $mid isn't evaluate.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Bugs already reported but not fixed [Re: Wims] #184031 24/08/07 07:10 PM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
I think the second thing you've shown should give an error.

Re: Bugs already reported but not fixed [Re: hixxy] #184040 24/08/07 09:06 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
Why ? this can be reproduced with any $identifier that use bracket ().

Code:
$mid(text,1,2)Ga

Where is the error ?


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Bugs already reported but not fixed [Re: Wims] #184042 24/08/07 09:40 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Originally Posted By: Wims

Code:
//Echo -a $mid(text,1,2)Ga

This will echo "te" but i think it should return $mid(text,1,2)Ga

It's returning "te" as mIRC evaluates the $mid* thingie (you're using "//" in your echo command). If you want it to return "$mid(text,1,2)Ga", use /echo, not //echo.

But I think this should return an error, too:
Everything appending a text token identifier (don't know how to call this, like the example "$1's") is appended, but not everything appending the return of an alias/command, like $mid().
"$me's" never worked: how shall mIRC now whether to call "$me" and append "'s", or call a custom alias named "$me's"
The return of a nonexistent alias is $null, and //echo -a $null returns an error: * /echo: insufficient parameters smile

Re: Bugs already reported but not fixed [Re: Horstl] #184046 24/08/07 10:10 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:
It's returning "te" as mIRC evaluates the $mid part (you're using "//" in your echo command). If you want it to return "$mid(text,1,2)Ga", use /echo, not //echo.


I'm not sure but i think you misundestood what i trying to show, i don't want to return anything, there is just a problem, if 1$mid(text,1,2) return 1$mid(text,1,2), so $mid(text,1,2)1 should return $mid(text,1,2)1.

Quote:
The return of a nonexistent alias is $null, and //echo -a $null returns an error smile

I agree but it's not the case here, $mid()Ga can't be a name of an alias (custom or not) because there is bracket.
If mirc parsed it as an alias, i'll should have in echo :
Quote:
no such identifier $mid()Ga



Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Bugs already reported but not fixed [Re: Wims] #184049 24/08/07 10:53 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Ok - now I get your point, thanks for clarification.

Regarding the error message: I have "identifier warning" disabled.

This might be regarded as a bug, but also I can imagine it's acting this way by design.
For me it is some "syntax gray area" - and I'm not dropping my own "should return $null/error" rating for the issue...yet smile


Re: Bugs already reported but not fixed [Re: Horstl] #184055 24/08/07 11:20 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:
This might be regarded as a bug, but also I can imagine it's acting this way by design.


I agree but if it was a normal behavior (like $1's) the text after the $identifier should be returned too.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Bugs already reported but not fixed [Re: Wims] #184056 24/08/07 11:21 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
I'd imagine the reason that it doesn't give an error when you append text to the end of an identifier is because of props. If a prop is invalid, the identifier will still return the value as if there wasn't a prop.

//echo -a $chan(#channelname).topic2

That will return the channel name rather than an error. If the prop isn't valid, it's removed. Of course, you could make it throw and error if there's no "." there. I'm just showing why it probably doesn't give an error.


Invision Support
#Invision on irc.irchighway.net
Re: Bugs already reported but not fixed [Re: Riamus2] #184064 25/08/07 12:11 AM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
Good point, I don't think about that before, but $mid doesn't support .props (it's the same for other identifiers like $asc, $chr etc...), so if the text isn't a props (event invalid), mirc should return the text as a "plain text" :

Code:
//echo -a $chan(#channelname).topic2 < return channel name
//echo -a $chan(#channelname).topic  < return the topic of the channel
//echo -a $chan(#channelname)text    < imo, should return $chan(#channelname)text



Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Bugs already reported but not fixed [Re: Wims] #184067 25/08/07 01:09 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
I disagree about it displaying plain text. It should give an error message, not display the code. Yes, if you put text before the identifier, it will display as plain text, but that's because there's no way to know if it's supposed to be an identifier if there isn't a $ as the first character.


Invision Support
#Invision on irc.irchighway.net
Re: Bugs already reported but not fixed [Re: Riamus2] #184070 25/08/07 01:36 AM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
Hum i don't care in fact, but which error mirc can be returns ?

* $ident() invalid format ?


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Bugs already reported but not fixed [Re: Wims] #184074 25/08/07 03:13 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Whatever Khaled feels like using would be fine, I'm sure.


Invision Support
#Invision on irc.irchighway.net
Re: Bugs already reported but not fixed [Re: Wims] #189391 07/11/07 05:36 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 first bug concerning the behavior of $N'text with text that contain number is still present is 6.31



Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Bugs already reported but not fixed [Re: Wims] #189450 07/11/07 08:38 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
None of these are bugs, they're a reality of the mIRC parser.. that's why they were never "fixed". You really shouldn't be nitpicking about silly things like how mIRC reacts with code that violates the language syntax since the expected result is *UNDEFINED*. The invalid identifier warning you get is a convenience, not a requirement or guarantee. If you do something mIRC can't understand, that's your bug, not mIRC's.

As far as $1XYZ goes, that's a specific *feature* of the language, the same way the parser allows "//echo -a $mircdirSUBDIRECTORY" without using $+ for convenience. Not a bug.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"