20.06.2015, 20:27
Hi.
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...
Код:
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; }
Any solutions?
P.S sorry for indentation. It got loose after pasting my code...