mIRC Home    About    Download    Register    News    Help

Print Thread
old /set bug #72764 25/02/04 12:38 PM
Joined: Feb 2004
Posts: 3
B
belf Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Feb 2004
Posts: 3
Code:
a1 {
  var %s = 1
  set $+(-u,%s) %var test
}
a2 {
  var %s = 1
  set -u [ $+ [ %s ] ] %var test
}
a3 {
  var %s = 1
  set -u $+ %s %var test
}


Put in aliases. /a3 will give " */set: invalid parameters " error.

Re: old /set bug #72765 25/02/04 02:06 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
been discussed a few times in the past.


New username: hixxy
Re: old /set bug #72766 25/02/04 08:50 PM
Joined: Feb 2003
Posts: 2,662
Raccoon Online
Hoopy frood
Online
Hoopy frood
Joined: Feb 2003
Posts: 2,662
I imagine this is because /set is unique in that it scans ahead for set's %variable before it allows evaluation to begin. Since it does this before evaluation, it pays no heed to the $+ attaching it to -u. It just sees %s and says "this must be the varaible I am setting to."

You will have to use [ ]'s to force premature evaluation.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: old /set bug #72767 26/02/04 01:38 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:

Put in aliases. /a3 will give " */set: invalid parameters " error.


Guess what?

Thats becuase it is a invalid parameter.

just becuase u can get away with "set %blah $+ %num 123" and not have to do "set %blah [ $+ [ %num ] ] 123" doesnt mean u can getaway with it everywhere else.

Re: old /set bug #72768 26/02/04 05:14 AM
Joined: Feb 2003
Posts: 2,662
Raccoon Online
Hoopy frood
Online
Hoopy frood
Joined: Feb 2003
Posts: 2,662
Then why does [color:000099]/ban -u $+ %secs %chan %nick 3[/color] work?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: old /set bug #72769 26/02/04 06:29 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Your question is flawed.

To uses another subject...

I made a statment like "Just becuase that ball bounces on concrete doesnt mean it well bounce on everything"

And you replied "Then why does my ball bounce on wood?"

Its irrelevent if it does or doesnt, its not a "then why" question.

Re: old /set bug #72770 26/02/04 07:43 AM
Joined: Feb 2003
Posts: 2,662
Raccoon Online
Hoopy frood
Online
Hoopy frood
Joined: Feb 2003
Posts: 2,662
It is?
I did?

Please point out the fundimental difference between these two commands?

[color:000099]/set -u $+ %s %var test[/color]
[color:000099]/ban -u $+ %secs %chan %nick 3[/color]

They are identical. The only difference is the /set command errors, while the /ban command does not... for the reasons I stated 2 posts ago. mIRC performs special pre-evaluation level handling for /set commands which makes it think [color:000099]%s[/color] is the target variable.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: old /set bug #72771 26/02/04 09:44 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
the only reason i would say it is a bug is that some commands allow -u $+ %var and some don't, i wouldn't say it's a bug because -u $+ %var doesn't work.. considering that's what evaluation brackets are used for ;-]


New username: hixxy
Re: old /set bug #72772 26/02/04 12:24 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
Please point out the fundimental difference between these two commands

the /set modifies a local contents for a limited time
the /ban modifies a irc security for a limited time

Quote:
They are identical

Lets do a little test...
//if ($(/set -u $+ %s %var test,0) == $(/ban -u $+ %secs %chan %nick 3,0)) echo My we are the same!
//if ($(/set -u $+ %s %var test,0) != $(/ban -u $+ %secs %chan %nick 3,0)) echo Hmmm we seem to be different.

Now after the (sarcasticly written) replies above, I dont really see how you felt what i said was wrong, just becuase it sometimes works dont mean it well work all the time.

Set by its logic of what its doing must not evaluate the first variable it finds else it cant set that as it would have evaluated it, and no longer have the variable name to set something to.

I hav had this to deal with...
//set %con %hold 1
it sets %con to the value of [ %hold ] 1
but %con actually held "-u30" becuase it was a conditional set of %hold for 30 seconds.
had to make it this...
//set $(%con,1) %hold 1
when i found the falut in my code before replacing with the above line, i looked at it and thought, well damn, of course its gonna set the first one to that, how is it ment to know what i wanted it to do.

//ban %con %chan %nick
is fine of course as it is would what it would be.

Re: old /set bug #72773 27/02/04 12:22 AM
Joined: Feb 2004
Posts: 3
B
belf Offline OP
Self-satisified door
OP Offline
Self-satisified door
B
Joined: Feb 2004
Posts: 3
That's called CONSISTENCY. And there IS a similiarity between:

Code:
/set -u $+ blah
/ban -u $+ blah


I don't care if they perform different commands. The problem here is the SYNTAX.

You're saying that I can do
Code:
/command1 -u $+ something
and I cannot do
Code:
/command2 -someotherswitch $+ something
because they perform different things.

LOGICALLY, it is NOT an invalid parameter.

Re: old /set bug #72774 27/02/04 12:53 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
LOGICALLY, it is NOT an invalid parameter


But you see the needs of the many (to set variables) out weigh the needs of the few (to resetem on a time).

As i have said else where in this message, you cant just hope for the best because something works ok in one place, that its gonna work else where.

U used this as your example "set -u $+ %s %var test"
what if insead it had this ben this...
var %display.set.for.debugging = -s
set %display.set.for.debugging %var test

now you tell me what should happen? Should it set %var to test while displaying it becuase of the -s ?

Re: old /set bug #72775 28/02/04 10:34 AM
Joined: Oct 2003
Posts: 11
R
rintaun Offline
Pikka bird
Offline
Pikka bird
R
Joined: Oct 2003
Posts: 11
the /set command is a different command, and thus may have different syntax. it must operate differently to accomplish the goal which it is meant to achieve. deal with it, honestly.


^------rintaun irl