The last servers you connected to (I think) are automatically saved in order.
Try:
//echo -a $server(1)
//echo -a $server(2)
//echo -a $server(3)
//echo -a $server(4)
See if they are the last few servers you connected to.
Oh, you have to alter one thing...
In mIRC Options, Connect--->Options, put a "tick" in the box marked "Move to top of list on connect"
This makes mIRC move the server yo last connected to to the top of the list (so if you are connected to a server now, doing //echo -a $server(1) would tell you the server you are on) $server(2) would tell you the you were on before...etc...
From the help file (/help Connect Options):
[help]
Move to top of list on connect
Moves a server to the top of the servers list when you connect to it.
[/help]