#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
#2

hmm is that line the blank line? Check the code you've edited previously, maybe paste that code.
Reply
#3

Doens't matter , i've found what was wrong , thanks anyway.
Reply
#4

if not what lorenc asked and if it is the "if(EnTop == false)" then:
did you define the "EnTop" variable as a "boolean" or as a normal integer?
incase you just wrote "new EnTop;" then you need to check for numbers... e.g. if(EnTop == 0)


edit: now I'm late..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)