#1

I've tryed to create something but i get the following error
Код:
(615) : error 006: must be assigned to an array
and code is..
Код:
// Line 615
if(EnTop == false)
          {
            if(VALUE > MAX_VALUE)
            {
               MAX_VALUE = Value;
               TopC[Place] = i;
            }
          }
      }

toata:
forward UpdateTopClans();
public UpdateTopClans()
{
   new
       File:file,
       File[64],
       string[128],
       Line,
       Place,
       Float:MAX_VALUE = -1.0;

   //Extract data from File "Clans.txt"
   file = fopen("Clans.txt", io_read);
   while(fread(file, string))
   {
       new
           v = strfind(string, ";", true);

      strmid(Name[Line], string, 0, v, 24);
      format(File, sizeof File, "Clans/%s.ini", Name[Line]);
      if(dini_Exists(File))
      {
          VALUE[Line] = dini_Float(File, "Ratio");
      }
       Line++;
   }
   fclose(file);
   //PLACES AND KEEP GETTING
   Place = 1;
   while(Place < MAX_TOP_CLANS+1)
   {
      for(new i = 0; i < MAX_DATAS; i++)
      {
          if(EnTop == false)
          {
            if(VALUE > MAX_VALUE)
            {
               MAX_VALUE = Value;
               TopC[Place] = i;
            }
          }
      }
      strmid(TopInfoC[Place][NickTOP], Name[TopC[Place]], 0, strlen(Name[TopC[Place]]), 24);
      format(File, sizeof File, "Clans/%s.ini", TopInfoC[Place][NickTOP]);
      TopInfoC[Place][KillsTOP] =  dini_Int(File, "Kills");
      TopInfoC[Place][DeathsTOP] = dini_Int(File, "Deaths");
      TopInfoC[Place][RatioTOP] = dini_Float(File, "Ratio");
      EnTop[TopC[Place]] = true;
      MAX_VALUE = -1;
       Place++;
   }
   //DATA RESET:
   for(new s = 0; s < MAX_DATAS; s++)
   {
      EnTop = false;
      Name[0] = 0;
      VALUE = 0.0;
   }
   //SAVE DATA IN A STRING OF CHARACTERS
   format(DLG_TOP_CLAN_STR, sizeof DLG_TOP_CLAN_STR, "");
   Place = 1;
   while(Place < MAX_TOP_CLANS+1)
   {
       if(strlen(TopInfoP[Place][NickTOP])) {
         format(DLG_TOP_CLAN_STR, sizeof DLG_TOP_CLAN_STR,
         "%s| %2d | A: %6d | M: %6d | A/M: %0.1f| Clan: %s \n",
         DLG_TOP_CLAN_STR, Place, TopInfoC[Place][KillsTOP], TopInfoC[Place][DeathsTOP],
         TopInfoC[Place][RatioTOP], TopInfoC[Place][NickTOP]);
      }
      Place++;
   }
//   print(DLG_TOP_CLAN_STR); //DEBUG
   SetTimer("UpdateTopClans", 62000, 0);
}
Reply


Messages In This Thread
Help - by Rock_Ro - 09.04.2011, 12:15
Re: Help - by Lorenc_ - 09.04.2011, 13:12
Re: Help - by Rock_Ro - 09.04.2011, 13:14
Re: Help - by Sascha - 09.04.2011, 13:16

Forum Jump:


Users browsing this thread: 1 Guest(s)