I've also noticed that $scid(0) returns 5 but $scid(5) returns nothing, however $scon(0) returns 5 and $scon(5) returns 8.
That is entirely possible.
SCON: 1 | 2 | 3 | 4 | 5
SCID: 1 | 3 | 4 | 6 | 8
SCON refers to the connection number starting at 1 on the top-left of the switchbar and increasing by 1 as you move left and down.
SCID refers to a unique identifier given to each connection that is not reused in the life of that mIRC session.
$scid(5) returns nothing because there is no server connection with that CID. This may be because you opened that server connection, and have since closed it. Once CID 5 is used, it cannot be reused until you restart mIRC.
$scon(5) returns 8 because the 5th server connection from the top-left has a CID of 8.
You must have opened and closed 3 server connections since you started your current mIRC session.
The problem with your titlebar may be that your are using $scon where you should be using $scid, or vice versa. You probably have something like this:
if ($scon(
8).status == connected) titlebar ONLINE
else titlebar OFFLINE
You would have a variable of some sort hereSo when $scon( ).status doesn't return 'connected' (it returns null), the script defaults to displaying 'OFFLINE'.
-genius_at_work