wtf? is wrong with this fuck thingy?
#1

Ey, everytime when I try to set this clan system in my server it goes wrong. But the thing is, there is nothing wrong.
Sometimes it work, But if I put something news in it it won't work for shit. And I never can find any mistake. I'm fucking with this crap for 2 hours.

Code loading clans:

Код:
public LoadStuntClans()
{
	new arrCoords[37][64];
	new strFromFile2[256];
	new File: file = fopen("General/Clans.ini", io_read);
	if (file)
	{
		new idx;
		while (idx < sizeof(ClanInfo))
		{
			fread(file, strFromFile2);
			split(strFromFile2, arrCoords, '|');
			strmid(ClanInfo[idx][fName], arrCoords[0], 0, strlen(arrCoords[0]), 255);
			ClanInfo[idx][fX] = floatstr(arrCoords[1]);
			ClanInfo[idx][fY] = floatstr(arrCoords[2]);
			ClanInfo[idx][fZ] = floatstr(arrCoords[3]);
			ClanInfo[idx][SpawnWep1] = strval(arrCoords[4]);
			ClanInfo[idx][SpawnWep2] = strval(arrCoords[5]);
			ClanInfo[idx][fArmor] = strval(arrCoords[6]);
			strmid(ClanInfo[idx][fRank1], arrCoords[7], 0, strlen(arrCoords[7]), 255);
			strmid(ClanInfo[idx][fRank2], arrCoords[8], 0, strlen(arrCoords[8]), 255);
            strmid(ClanInfo[idx][fRank3], arrCoords[9], 0, strlen(arrCoords[9]), 255);
            strmid(ClanInfo[idx][fRank4], arrCoords[10], 0, strlen(arrCoords[10]), 255);
            strmid(ClanInfo[idx][fRank5], arrCoords[11], 0, strlen(arrCoords[11]), 255);
            strmid(ClanInfo[idx][fRank6], arrCoords[12], 0, strlen(arrCoords[12]), 255);
            strmid(ClanInfo[idx][fRank7], arrCoords[13], 0, strlen(arrCoords[13]), 255);
            strmid(ClanInfo[idx][fRank8], arrCoords[14], 0, strlen(arrCoords[14]), 255);
            strmid(ClanInfo[idx][fRank9], arrCoords[15], 0, strlen(arrCoords[15]), 255);
            strmid(ClanInfo[idx][fRank10], arrCoords[16], 0, strlen(arrCoords[16]), 255);
			ClanInfo[idx][fSkin1] = strval(arrCoords[17]);
			ClanInfo[idx][fSkin2] = strval(arrCoords[18]);
			ClanInfo[idx][fSkin3] = strval(arrCoords[19]);
			ClanInfo[idx][fSkin4] = strval(arrCoords[20]);
			ClanInfo[idx][fSkin5] = strval(arrCoords[21]);
			ClanInfo[idx][fSkin6] = strval(arrCoords[22]);
			ClanInfo[idx][fSkin7] = strval(arrCoords[23]);
			ClanInfo[idx][fSkin8] = strval(arrCoords[24]);
			ClanInfo[idx][fSkin9] = strval(arrCoords[25]);
			ClanInfo[idx][fSkin10] = strval(arrCoords[26]);
			ClanInfo[idx][fJoinRank] = strval(arrCoords[27]);
			ClanInfo[idx][fUseSkins] = strval(arrCoords[28]);
			ClanInfo[idx][fType] = strval(arrCoords[29]);
			ClanInfo[idx][fRankAmount] = strval(arrCoords[30]);
			ClanInfo[idx][fColor] = strval(arrCoords[31]);
			ClanInfo[idx][fUseColor] = strval(arrCoords[32]);
			strmid(ClanInfo[idx][fColorName], arrCoords[33], 0, strlen(arrCoords[33]), 255);
			strmid(ClanInfo[idx][fOwnerName], arrCoords[34], 0, strlen(arrCoords[34]), 255);
			ClanInfo[idx][fMembers] = strval(arrCoords[35]);
			ClanInfo[idx][fInt] = strval(arrCoords[36]);
			printf("[Clan Stunt:] Clan Name: %s, %d,%d,%d Type: %d, ID: %d",ClanInfo[idx][fName],ClanInfo[idx][fJoinRank],ClanInfo[idx][fUseSkins],ClanInfo[idx][fRankAmount],ClanInfo[idx][fType],idx);
			idx++;
		}
		fclose(file);
	}
	return 1;
}
Lines in my Clans.ini file
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0

Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0
Clan0|0.000000|0.000000|0.000000|0|0|0|Rank1|Rank2 |Rank3|Rank4|Rank5|Rank6|Rank7|Rank8|Rank9|Rank10| 0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|Red|Nobody|0|0

Lol look at this. Thats not even possible.
Here are the console lines:
Код:
[12:11:10] [Clan Stunt:] Clan Name: Clan0, 0,0,0 Type: 0, ID: 0
[12:11:10] [Clan Stunt:] Clan Name: 

, 0,0,0 Type: 0, ID: 1
[12:11:10] [Clan Stunt:] Clan Name: Clan1, 0,0,0 Type: 0, ID: 2
[12:11:10] [Clan Stunt:] Clan Name: Clan2, 0,0,0 Type: 0, ID: 3
[12:11:10] [Clan Stunt:] Clan Name: Clan3, 0,0,0 Type: 0, ID: 4
[12:11:10] [Clan Stunt:] Clan Name: Clan4, 0,0,0 Type: 0, ID: 5
[12:11:10] [Clan Stunt:] Clan Name: Clan5, 0,0,0 Type: 0, ID: 6
[12:11:10] [Clan Stunt:] Clan Name: Clan6, 0,0,0 Type: 0, ID: 7
[12:11:10] [Clan Stunt:] Clan Name: Clan7, 0,0,0 Type: 0, ID: 8
[12:11:10] [Clan Stunt:] Clan Name: Clan8, 0,0,0 Type: 0, ID: 9

It's SHOULD BE
[12:11:10] [Clan Stunt:] Clan Name: Clan0, 0,0,0 Type: 0, ID: 0
[12:11:10] [Clan Stunt:] Clan Name: Clan1, 0,0,0 Type: 0, ID: 1
[12:11:10] [Clan Stunt:] Clan Name: Clan2, 0,0,0 Type: 0, ID: 2
[12:11:10] [Clan Stunt:] Clan Name: Clan3, 0,0,0 Type: 0, ID: 3
[12:11:10] [Clan Stunt:] Clan Name: Clan4, 0,0,0 Type: 0, ID: 4
[12:11:10] [Clan Stunt:] Clan Name: Clan5, 0,0,0 Type: 0, ID: 5
[12:11:10] [Clan Stunt:] Clan Name: Clan6, 0,0,0 Type: 0, ID: 6
[12:11:10] [Clan Stunt:] Clan Name: Clan7, 0,0,0 Type: 0, ID: 7
[12:11:10] [Clan Stunt:] Clan Name: Clan8, 0,0,0 Type: 0, ID: 8
[12:11:10] [Clan Stunt:] Clan Name: Clan9, 0,0,0 Type: 0, ID: 9
Seriously how in gods life can clan ID 1 be wrong. And all the other clans are working??
the lines are exactly the same in the save file...
Somebody who can fix this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)