mIRC Home    About    Download    Register    News    Help

Print Thread
#189723 11/11/07 09:55 AM
S
symphony
symphony
S
$scon($cid).prop just won't return a value in a connection id with status connected.
I have tried so many times, same result. Always returning null; along with $scon(N).prob of course - while in a connection id where status id disconnected, it works fine.

#189724 11/11/07 10:11 AM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
Hum, working fine here on 6.31.
//echo -a $scon($cid).status $scon($cid).network $scon($cid).me $scon($cid).active $duration($scon($cid).uptime)
being connected, they all return what they should...

Do you have some custom scon alias (just to play save)?

Horstl #189726 11/11/07 10:26 AM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Nah, it's probably because the $cid is no longer sequential, and thus $scon() is getting the wrong numerical handle.

Use $scid($cid).xxx instead.

Bekar #189729 11/11/07 10:29 AM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
You're right, I should start thinking first whistle

#189743 11/11/07 02:55 PM
Joined: Oct 2006
Posts: 166
B
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2006
Posts: 166
A3MAD!!!

Bekar #189746 11/11/07 03:31 PM
S
symphony
symphony
S
Well, not that $cid is longer sequential. It used to work in the past as far as I remember. I still believe its a bug.

#189748 11/11/07 03:57 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
Connection IDs not being sequential isn't a bug. This has been discussed in a previous thread about the issue.

It's clear from your code that it will break simply because you're using $s[color:red]con($cid).prop[/color] - ie. you're giving a connection ID to an identifier that explicitly takes a connection number (a sequential number of 1-n where n is the number of status windows). The fact that it ever worked at all was purely coincidental. As Bekar pointed out, $scid exists precisely for what you want.


Link Copied to Clipboard