mIRC Homepage
Posted By: Ecronika Bug /inc with /scid - 29/04/05 07:05 PM
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
Posted By: mIRCManiac Re: Bug /inc with /scid - 29/04/05 07:10 PM
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*
Posted By: Ecronika Re: Bug /inc with /scid - 29/04/05 07:20 PM
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- 
Posted By: mIRCManiac Re: Bug /inc with /scid - 29/04/05 07:21 PM
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)
Posted By: Ecronika Re: Bug /inc with /scid - 29/04/05 07:24 PM
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)
Posted By: mIRCManiac Re: Bug /inc with /scid - 29/04/05 07:30 PM
try this
//scon -at1 if ($idle) echo -a $!network ~ $!v1

then try this
//scon -at1 if ($!idle) echo -a $!network ~ $!v1
Posted By: Ecronika Re: Bug /inc with /scid - 29/04/05 07:36 PM
Quote:
//scon -at1 if ($idle) echo -a $!network ~ $!v1


QuakeNet ~ 4

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


QuakeNet ~ $idle
UnderNet ~ $idle
Posted By: DaveC Re: Bug /inc with /scid - 29/04/05 09:51 PM
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.
Posted By: Ecronika Re: Bug /inc with /scid - 30/04/05 08:45 AM
I typed the commands in the quakenet window ...
Posted By: DaveC Re: Bug /inc with /scid - 30/04/05 09:59 PM
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.
© mIRC Discussion Forums