Need help with loading something...
#1

Family's are not saving. I need help heres the code.

Код:
public OnLoadFamilies() {
	new rows, fields;
	cache_get_data(rows,fields);
	
	new id_string[128];

	for(new i=0;i<rows;i++) {	
		
		cache_get_row(i,1,id_string);
		strmid(Families[i][EFamilyName], id_string,0,strlen(id_string), MAX_FAMILY_NAME);

		Families[i][EFamilySQLID] = strval(id_string);

		cache_get_row(i,2, id_string);
		Families[i][EFamilyColour] = strval(id_string);
		
		cache_get_row(i,3,Families[i][EFamilyMOTD]);
		
		cache_get_row(i,4,Families[i][EFamilyOwner]);
		
		GiveNameSpace(Families[i][EFamilyOwner]);

		cache_get_row(i,5,FamilyRanks[i][0]); //rank1text 
		cache_get_row(i,6,id_string); //rank1perms
		Families[i][EFamilyRankPerms][0] = EFamilyPermissions:strval(id_string);
		
		cache_get_row(i,7,FamilyRanks[i][1]); //rank2text
		cache_get_row(i,8,id_string); //rank2perms
		Families[i][EFamilyRankPerms][1] = EFamilyPermissions:strval(id_string);
		
		cache_get_row(i,9,FamilyRanks[i][2]); //rank3text
		cache_get_row(i,10,id_string); //rank3perms
		Families[i][EFamilyRankPerms][2] = EFamilyPermissions:strval(id_string);
		
		cache_get_row(i,11,FamilyRanks[i][3]);	//rank4text
		cache_get_row(i,12,id_string); //rank4perms
		Families[i][EFamilyRankPerms][3] = EFamilyPermissions:strval(id_string);
		
		cache_get_row(i,13,FamilyRanks[i][4]); //rank5perms
		cache_get_row(i,14,id_string); //rank5perms
		Families[i][EFamilyRankPerms][4] = EFamilyPermissions:strval(id_string);
		
		cache_get_row(i,15,FamilyRanks[i][5]); //rank5perms
		cache_get_row(i,16,id_string); //rank5perms
		Families[i][EFamilyRankPerms][5] = EFamilyPermissions:strval(id_string);
		
		cache_get_row(i,17,id_string); //hq
		Families[i][EFamilyHQID] = strval(id_string);
		
		cache_get_row(i,18,id_string); //hqx
		Families[i][EFamilyHQX] = floatstr(id_string);
		
		cache_get_row(i,19,id_string); //hqy
		Families[i][EFamilyHQY] = floatstr(id_string);
		
		cache_get_row(i,20,id_string); //hqz
		Families[i][EFamilyHQZ] = floatstr(id_string);
		
		LoadFamilyCars(Families[i][EFamilySQLID]);
		
	}
	pointsOnGameModeInit();
	loadFamilySafes();
}
Reply
#2

EDIT: Im trying to update to R8. If anyone can do this it would be great. Thanks.
Reply
#3

Families aren't saving, yet you post up the loading section... Post up "SaveFamilies"...


As for you updating, what exactly are you updating to R8? MySQL? Blues MySQL is up to R39, so yea, you may be a slight bit behind.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)