there would be another way also, incase none of the numbers is 0 exactly. Just put a file_var_read to the while loop and increase counter amount on each loop call. When 0 is reached close the loop.something like this:

Code:
var var_to_read = 0;
var var_amount = 0;
var handle_of_file = file_open_read("FILE.txt");
while(1)
{
   var_to_read = file_var_read(handle_of_file);
   if(var_to_read == 0)
   {
       break;
    }
   var_amount++;
}



Last edited by Walori; 06/14/10 16:05. Reason: code brackets!