Missing bracket?
#1

Hi.

Код:
if(dialogid == 351)
{
   if(response)
   {
      for(new g; g<50; g++)
      {
         if(playerDB[playerid][Gauja] == GangDB[g][GNumber])
         {
            new str[256];
            format(str, 64, "Gaujos/%s.ini", GangDB[g][GName]);
            dfile_Open(str);
            new pool = GetPlayerPoolSize();
            for(new p; p<=pool; p++)
            {
		       if(!IsPlayerConnected(p))
		       {
			      continue;
		       }
		       if(playerDB[p][Gauja] == playerDB[playerid][Gauja])
		       {
                  new name[24];
	              GetPlayerName(p, name, 24);
                  format(str, 24, "%s|", name);
                  dfile_WriteString("GMembers", str_replace(str, "", dfile_ReadString("GMembers")));
                  playerDB[p][Gauja]=0;
                  SendClientMessage(p, GANG_SPALVA, "[GAUJOS CHAT] {FFFFFF}Gauja uюdaroma! Visi nariai iрmetami!");
			      GangDB[g][GMembers]-=1;
		       }
	        }
	        if(GangDB[g][GMembers] > 0)
	        {
		       new gangs[10][20];
		       explode(gangs, dfile_ReadString("GMembers"), "|");
		       dfile_SaveFile();
		       dfile_CloseFile();
		       for(new x; x<10; x++)
		       {
			      if(gangs[x][0])
			      {
			         format(str, 64, "saves/user/%s.ini", gangs[x]);
			         dfile_Open(str);
			         dfile_WriteInt("Gauja", -1);
			         dfile_SaveFile();
			         dfile_CloseFile();
			      }
		       }
	        }
	        else
	        {
		       dfile_SaveFile();
		       dfile_CloseFile();
	        }
            format(str, 64, "Gaujos/%s.ini", GangDB[g][GName]);
            dfile_Delete(str);
            DeleteNameFromFile("Gaujos/Gaujos.txt", GangDB[g][GName]);
            GangDB[g][gx] = 0.0;
            GangDB[g][gy] = 0.0;
            GangDB[g][gz] = 0.0;
            GangDB[g][GSize] = 0;
            GangDB[g][GSkin] = 0;
            GangDB[g][GMafia] = 0;
            GangDB[g][GColor] = 0;
            GangDB[g][GNumber] = 0;
            GangDB[g][GPoints] = 0;
            GangDB[g][GName][0] = 0;
            GangDB[g][GMembers] = 0;
            GangZoneDestroy(GangDB[i][GZone]);
            break;
         }
	  }
   }
   return 1;
}
Somewhy, this code breaks my gamemode... It gives errors that other variables are undefined, or shadows other variables... When I remove this code, no errors appear...

Any solutions?

P.S sorry for indentation. It got loose after pasting my code...
Reply


Messages In This Thread
Missing bracket? - by iWhite - 20.06.2015, 20:27
Re: Missing bracket? - by UltraScripter - 20.06.2015, 20:37
Re: Missing bracket? - by iWhite - 20.06.2015, 20:44
Re: Missing bracket? - by UltraScripter - 20.06.2015, 20:46
Re: Missing bracket? - by SV - 20.06.2015, 20:47
Re: Missing bracket? - by iWhite - 20.06.2015, 21:02
Re: Missing bracket? - by Dusan01 - 20.06.2015, 21:05
Re: Missing bracket? - by iWhite - 21.06.2015, 13:59

Forum Jump:


Users browsing this thread: 1 Guest(s)