28.11.2013, 19:46
Hello i have this 2 things in my script, i think they causing infinite loop so server freezes? Can someone check it
First Code
Second Code
First Code
Код:
new c = 0; for(new n = 0; n < 20; n++) { if(udb_hash(member[n]) == udb_hash("Niko")) { //the rest of my code return 1; } else if(udb_hash(member[n]) != udb_hash("Niko")) { c++; if(c == 20) return SCM(playerid... //the rest of my code } }
Код:
new org[64]; new c = 0; new ime[MAX_PLAYER_NAME]; GetPlayerName(playerid, ime, sizeof(ime)); format(org,64,"Org_%d.ini",PlayerInfo[playerid][pOrg]); INI_ParseFile(org, "LoadMembers_%s", .bExtra = true, .extra = playerid); for(new n = 0; n < 20; n++) { if(udb_hash(member[n]) != udb_hash(ime)) { c++; } if(c == 20) { //the rest of my code } }