mIRC Home    About    Download    Register    News    Help

Print Thread
Bug /inc with /scid #118860
29/04/05 07:05 PM
29/04/05 07:05 PM
Joined: Jan 2003
Posts: 56
E
Ecronika Offline OP
Babel fish
Ecronika  Offline OP
Babel fish
E

Joined: Jan 2003
Posts: 56
I got an error with /scid and /inc today ... maybe it is a bug or am i wrong with my script!?

Code:
alias a { %t = 0 | scid -at1 if ($idle < 300) { inc %t } }

Quote:
* /inc: invalid parameters


Ecronika
My mIRC Addons
Re: Bug /inc with /scid #118861
29/04/05 07:10 PM
29/04/05 07:10 PM
Joined: Feb 2005
Posts: 681
Your dreams ;)
M
mIRCManiac Offline
Fjord artisan
mIRCManiac  Offline
Fjord artisan
M

Joined: Feb 2005
Posts: 681
Your dreams ;)
alias a { %t = 0 | scid -at1 if ($idle < 300) { inc $+(%,t) } }

~ Edit ~
I'm sorry for lack of explanation.
I wouldn't call this a bug, %t was being
evaluated before being sent to connections.
Basically, when the command reached it's
destination it looked like this
if ($idle < 300) { inc 0 }
because %t was being evaluated before being sent.
I don't know why %!t wouldn't work, but it wouldn't,
maybe there is a bug with that *shrug*

Last edited by mIRCManiac; 29/04/05 07:15 PM.

mIRCManiac
Re: Bug /inc with /scid #118862
29/04/05 07:20 PM
29/04/05 07:20 PM
Joined: Jan 2003
Posts: 56
E
Ecronika Offline OP
Babel fish
Ecronika  Offline OP
Babel fish
E

Joined: Jan 2003
Posts: 56
I will now use the following which works but i dont understand why i need $!idle here. The second example seems to work without the $! way ...

Code:
alias a { %t = 0 | scid -at1 if ([color:red]$!idle[/color] &lt; 300) inc % $+ t } 


Code:
if ($show) scid -at1 if ([color:red]$chan(0)[/color]) ame is $1- 


Ecronika
My mIRC Addons
Re: Bug /inc with /scid #118863
29/04/05 07:21 PM
29/04/05 07:21 PM
Joined: Feb 2005
Posts: 681
Your dreams ;)
M
mIRCManiac Offline
Fjord artisan
mIRCManiac  Offline
Fjord artisan
M

Joined: Feb 2005
Posts: 681
Your dreams ;)
You don't need to use $!idle because it's touching the bracket.
($idle so it's not being evaluated .. same with your ($chan(0))
example. If it begins with $ or % it will be evaluated before
being sent

will not be evaluated
/scon -at1 if ($me == mIRCManiac)

will be evaluated
/scon -at1 if (mIRCMainiac == $me)

so for the 2nd one you have to use
/scon -at1 if (mIRCManiac == $!me)

Last edited by mIRCManiac; 29/04/05 07:28 PM.

mIRCManiac
Re: Bug /inc with /scid #118864
29/04/05 07:24 PM
29/04/05 07:24 PM
Joined: Jan 2003
Posts: 56
E
Ecronika Offline OP
Babel fish
Ecronika  Offline OP
Babel fish
E

Joined: Jan 2003
Posts: 56
If i use $idle it counts 1 connection with $idle lower 300. If i use $!idle it counts 2 (which is right in this case)


Ecronika
My mIRC Addons
Re: Bug /inc with /scid #118865
29/04/05 07:30 PM
29/04/05 07:30 PM
Joined: Feb 2005
Posts: 681
Your dreams ;)
M
mIRCManiac Offline
Fjord artisan
mIRCManiac  Offline
Fjord artisan
M

Joined: Feb 2005
Posts: 681
Your dreams ;)
try this
//scon -at1 if ($idle) echo -a $!network ~ $!v1

then try this
//scon -at1 if ($!idle) echo -a $!network ~ $!v1


mIRCManiac
Re: Bug /inc with /scid #118866
29/04/05 07:36 PM
29/04/05 07:36 PM
Joined: Jan 2003
Posts: 56
E
Ecronika Offline OP
Babel fish
Ecronika  Offline OP
Babel fish
E

Joined: Jan 2003
Posts: 56
Quote:
//scon -at1 if ($idle) echo -a $!network ~ $!v1


QuakeNet ~ 4

Quote:
//scon -at1 if ($!idle) echo -a $!network ~ $!v1


QuakeNet ~ $idle
UnderNet ~ $idle


Ecronika
My mIRC Addons
Re: Bug /inc with /scid #118867
29/04/05 09:51 PM
29/04/05 09:51 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
DaveC  Offline
Hoopy frood
D

Joined: Sep 2003
Posts: 4,230
Well in your second example EVERY network your conencted to well come up becuase "$!idle" is evaluated to the string litteral "$idle" (5 characters) AS YOU SHOWED and since a existing string in a IF on its own always comes up as TRUE then it does the echo. I would suspect your first example is not showing UNDERNET becuase your typing the command from an undernet window, and thats causing the undernet $idle value to drop to zero. Try creating a 3rd connection then executing the FIRST example from it.

I know they were Mircmaniac's examples but they followed what you did in your code.

Re: Bug /inc with /scid #118868
30/04/05 08:45 AM
30/04/05 08:45 AM
Joined: Jan 2003
Posts: 56
E
Ecronika Offline OP
Babel fish
Ecronika  Offline OP
Babel fish
E

Joined: Jan 2003
Posts: 56
I typed the commands in the quakenet window ...


Ecronika
My mIRC Addons
Re: Bug /inc with /scid #118869
30/04/05 09:59 PM
30/04/05 09:59 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
DaveC  Offline
Hoopy frood
D

Joined: Sep 2003
Posts: 4,230
I doubt that since QuakeNet had a 4 second idle on it, so you hadnt typed (and pressed enter) in any of its windows in 4 seconds.