Why it don't work? Load MYSQL
#1

I have a problem to load strings on mysql
All ints/floats are loading right, but strings can't load!! Why!? Any can help me to fix?

Код:
			cache_get_field_content(factionid, "facname", FactionInfo[factionid][facname]);
			cache_get_field_content(factionid, "lider1", FactionInfo[factionid][lider1]);
			cache_get_field_content(factionid, "lider2", FactionInfo[factionid][lider2]);
			cache_get_field_content(factionid, "lider3", FactionInfo[factionid][lider3]);
			cache_get_field_content(factionid, "membro1", FactionInfo[factionid][membro1]);
			cache_get_field_content(factionid, "membro2", FactionInfo[factionid][membro2]);
			cache_get_field_content(factionid, "membro3", FactionInfo[factionid][membro3]);
			cache_get_field_content(factionid, "membro4", FactionInfo[factionid][membro4]);
			cache_get_field_content(factionid, "membro5", FactionInfo[factionid][membro5]);
			cache_get_field_content(factionid, "membro6", FactionInfo[factionid][membro6]);
			cache_get_field_content(factionid, "membro7", FactionInfo[factionid][membro7]);
			cache_get_field_content(factionid, "membro8", FactionInfo[factionid][membro8]);
			cache_get_field_content(factionid, "membro9", FactionInfo[factionid][membro9]);
			cache_get_field_content(factionid, "membro10", FactionInfo[factionid][membro10]);
			cache_get_field_content(factionid, "membro11", FactionInfo[factionid][membro11]);
			cache_get_field_content(factionid, "membro12", FactionInfo[factionid][membro12]);
Код:
CarregarFactions() {
    for(new factionid; factionid < MAX_FACTIONS; factionid++)
    {
        new query[50]; // Nгo precisa ser enorme como vocк tinha colocado; Precisa apenas caber sua query dentro dela
        mysql_format(ConnectMYSQL, query, sizeof(query), "SELECT * FROM factions WHERE ID = %d", factionid);
        mysql_function_query(ConnectMYSQL, query, true, "Carregar_Factions","i",factionid);
    }
}

// A forward e a public coloca no final do GM
forward Carregar_Factions(factionid);
public Carregar_Factions(factionid) {
    new rows, fields;
    cache_get_data(rows, fields);
    if(rows)
    {
			new int_dest[15];
			int_dest[0] = cache_get_field_content_int(0, "hq");               				FactionInfo[factionid][hq] = int_dest[0];
			int_dest[1] = cache_get_field_content_int(0, "cofredinheiro");               	FactionInfo[factionid][cofredinheiro] = int_dest[1];
			int_dest[2] = cache_get_field_content_int(0, "cofresalario");               	FactionInfo[factionid][cofresalario] = int_dest[2];
			int_dest[3] = cache_get_field_content_int(0, "cofrematerial");               	FactionInfo[factionid][cofrematerial] = int_dest[3];
			int_dest[4] = cache_get_field_content_int(0, "cofremaconha");               	FactionInfo[factionid][cofremaconha] = int_dest[4];
			int_dest[5] = cache_get_field_content_int(0, "EagleSPAWNfac");               	FactionInfo[factionid][EagleSPAWNfac] = int_dest[5];
			int_dest[6] = cache_get_field_content_int(0, "shotgunSPAWNfac");               	FactionInfo[factionid][shotgunSPAWNfac] = int_dest[6];
			int_dest[7] = cache_get_field_content_int(0, "spazSPAWNfac");               	FactionInfo[factionid][spazSPAWNfac] = int_dest[7];
			int_dest[8] = cache_get_field_content_int(0, "mp5SPAWNfac");               		FactionInfo[factionid][mp5SPAWNfac] = int_dest[8];
			int_dest[9] = cache_get_field_content_int(0, "akSPAWNfac");               		FactionInfo[factionid][akSPAWNfac] = int_dest[9];
			int_dest[10] = cache_get_field_content_int(0, "akSPAWNfac");              	 	FactionInfo[factionid][akSPAWNfac] = int_dest[10];
			int_dest[11] = cache_get_field_content_int(0, "m4SPAWNfac");             	  	FactionInfo[factionid][m4SPAWNfac] = int_dest[11];
			int_dest[12] = cache_get_field_content_int(0, "rifleSPAWNfac");               	FactionInfo[factionid][rifleSPAWNfac] = int_dest[12];
			int_dest[13] = cache_get_field_content_int(0, "sniperSPAWNfac");               	FactionInfo[factionid][sniperSPAWNfac] = int_dest[13];
			int_dest[14] = cache_get_field_content_int(0, "meleeSPAWNfac");               	FactionInfo[factionid][meleeSPAWNfac] = int_dest[14];
				
			cache_get_field_content(factionid, "facname", FactionInfo[factionid][facname]);
			cache_get_field_content(factionid, "lider1", FactionInfo[factionid][lider1]);
			cache_get_field_content(factionid, "lider2", FactionInfo[factionid][lider2]);
			cache_get_field_content(factionid, "lider3", FactionInfo[factionid][lider3]);
			cache_get_field_content(factionid, "membro1", FactionInfo[factionid][membro1]);
			cache_get_field_content(factionid, "membro2", FactionInfo[factionid][membro2]);
			cache_get_field_content(factionid, "membro3", FactionInfo[factionid][membro3]);
			cache_get_field_content(factionid, "membro4", FactionInfo[factionid][membro4]);
			cache_get_field_content(factionid, "membro5", FactionInfo[factionid][membro5]);
			cache_get_field_content(factionid, "membro6", FactionInfo[factionid][membro6]);
			cache_get_field_content(factionid, "membro7", FactionInfo[factionid][membro7]);
			cache_get_field_content(factionid, "membro8", FactionInfo[factionid][membro8]);
			cache_get_field_content(factionid, "membro9", FactionInfo[factionid][membro9]);
			cache_get_field_content(factionid, "membro10", FactionInfo[factionid][membro10]);
			cache_get_field_content(factionid, "membro11", FactionInfo[factionid][membro11]);
			cache_get_field_content(factionid, "membro12", FactionInfo[factionid][membro12]);
			
			new Float:float_dest[4];
			float_dest[0] = cache_get_field_content_float(0, "HQposX");     	FactionInfo[factionid][HQposX] = float_dest[0];
			float_dest[1] = cache_get_field_content_float(0, "HQposY");     	FactionInfo[factionid][HQposY] = float_dest[1];
			float_dest[2] = cache_get_field_content_float(0, "HQposZ");     	FactionInfo[factionid][HQposZ] = float_dest[2];
    }
}
Reply


Messages In This Thread
Why it don't work? Load MYSQL - by maikons - 27.09.2015, 18:09
Re: Why it don't work? Load MYSQL - by maikons - 28.09.2015, 22:44
Re: Why it don't work? Load MYSQL - by PrO.GameR - 28.09.2015, 22:49
Re: Why it don't work? Load MYSQL - by garotin - 28.09.2015, 23:22
Re: Why it don't work? Load MYSQL - by maikons - 29.09.2015, 22:17
Re: Why it don't work? Load MYSQL - by maikons - 30.09.2015, 04:43
Re: Why it don't work? Load MYSQL - by garotin - 30.09.2015, 04:47
Re: Why it don't work? Load MYSQL - by PrO.GameR - 30.09.2015, 10:04

Forum Jump:


Users browsing this thread: 1 Guest(s)