Finding Next Available Number
#7

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
the code is good but there are function that are not needed, which simply means more time to process because of the checks.
pawn Код:
stock GetFreeID()
{
      new file[12];
      for(new ID = 0; ID < MAX_SAVED_VEHICLES; ID++)
      {
            format(file, file(string), "%d.INI", ID);
            if(!fexist(file)) return ID;
      }
}
I thought I edited the post, but I must not of hit the submit button before going to my other tab. :P
Reply


Messages In This Thread
Finding Next Available Number - by nmader - 25.03.2013, 17:05
Re: Finding Next Available Number - by Scenario - 25.03.2013, 17:10
Re: Finding Next Available Number - by nmader - 25.03.2013, 17:13
Re: Finding Next Available Number - by Scenario - 25.03.2013, 17:15
Re: Finding Next Available Number - by nmader - 25.03.2013, 17:17
Re: Finding Next Available Number - by park4bmx - 25.03.2013, 17:29
Re: Finding Next Available Number - by Scenario - 25.03.2013, 17:34

Forum Jump:


Users browsing this thread: 1 Guest(s)