Hi,

this will show you each line of servers.dat:
Code:
 
alias loadserver {
  var %in = 1
  var %file = $+(",$mircdir,servers.dat,")
  var %lines = $lines(%file)
  while %in <= %lines { echo -a %in -> $read(%file,%in) | inc %in }
} 


Now I know you don't want it shown, but I posted this code anyways, so that you can see which mistakes you made (forgot a brace, %in = 0, set %datos where you don't use %datos,...)

Note1: Use $lines instead of setting a constant like 255, cuz each time your file changes, you'll have to manually change your code as well.

Note2: You can also set variables in a single line like var %x = .., %y = .. but here I chose for a new line each time, for better overview.

Note3: If the order of loading for these servers doesn't matter, then you could also do the following:
Code:

var %in = $lines(%file)
while %in { .... | dec %in }
}  


However, you state in your first post that you want to 'load' the stuff from your servers.dat...but what do you mean by that? You do know that you were overwriting %datos with each iteration?

A tip for the future (I've seen numerous posts by you, where you simply paste some code without any explanation at all):

Tell us what you are trying to achieve...what it is for...maybe then people will be compelled faster to help you.

Now, if you want to have each server from that file to be stored in variables, that is possible, though I would simply recommend using hash tables.

/help hash tables

Greetz


Gone.