Please help me to fix [load-mysql]
#4

Using latest MySQL Plugin Version is recommended but i fix your code too:
PHP код:
// carregar factions
CarregarFactions() {
    for(new 
facidfacid MAX_FACTIONSfacid++)
    {
        new 
query[50]; // Nгo precisa ser enorme como vocк tinha colocado; Precisa apenas caber sua query dentro dela
        
mysql_format(ConnectMYSQLquerysizeof(query), "SELECT * FROM factions WHERE ID = %d"facid);
        
mysql_function_query(ConnectMYSQLquerytrue"Carregar_Factions","i",facid);
    }
}
stock Carregar_Factions(facid) {
    new 
string[256], rowsfields;
    
cache_get_data(rowsfields);
    if(
rows)
    {
        new 
string_dest[30];
        
cache_get_field_content(0"facname"string_dest);           FactionInfo[facid][facname] = string_dest;
        
        new 
string_lider1[30];
        
cache_get_field_content(0"lider1"string_lider1);           FactionInfo[facid][lider1] = string_lider1;
        new 
string_lider2[30];
        
cache_get_field_content(0"lider2"string_lider2);           FactionInfo[facid][lider2] = string_lider2;
        new 
string_lider3[30];
        
cache_get_field_content(0"lider3"string_lider3);           FactionInfo[facid][lider3] = string_lider3;
        
        new 
string_membro[600];
        
cache_get_field_content(0"membro1"string_membro);           FactionInfo[facid][membro1] = string_membro;
        
cache_get_field_content(0"membro2"string_membro);           FactionInfo[facid][membro2] = string_membro;
        
cache_get_field_content(0"membro3"string_membro);           FactionInfo[facid][membro3] = string_membro;
        
cache_get_field_content(0"membro4"string_membro);           FactionInfo[facid][membro4] = string_membro;
        
cache_get_field_content(0"membro5"string_membro);           FactionInfo[facid][membro5] = string_membro;
        
cache_get_field_content(0"membro6"string_membro);           FactionInfo[facid][membro6] = string_membro;
        
cache_get_field_content(0"membro7"string_membro);           FactionInfo[facid][membro7] = string_membro;
        
cache_get_field_content(0"membro8"string_membro);           FactionInfo[facid][membro8] = string_membro;
        
cache_get_field_content(0"membro9"string_membro);           FactionInfo[facid][membro9] = string_membro;
        
cache_get_field_content(0"membro10"string_membro);           FactionInfo[facid][membro10] = string_membro;
        
cache_get_field_content(0"membro11"string_membro);           FactionInfo[facid][membro11] = string_membro;
        
cache_get_field_content(0"membro12"string_membro);           FactionInfo[facid][membro12] = string_membro;
        
        new 
Float:float_dest[3];
        
float_dest[0] = cache_get_field_content_float(0"HQposX");         FactionInfo[facid][HQposX] = float_dest[0];
        
float_dest[1] = cache_get_field_content_float(0"HQposY");         FactionInfo[facid][HQposY] = float_dest[1];
        
float_dest[2] = cache_get_field_content_float(0"HQposZ");         FactionInfo[facid][HQposZ] = float_dest[2];
        
        new 
int_dest[15];
        
int_dest[1] = cache_get_field_content_int(0"hq");         FactionInfo[facid][hq] = int_dest[1];
        
int_dest[2] = cache_get_field_content_int(0"cofredinheiro");         FactionInfo[facid][cofredinheiro] = int_dest[2];
        
int_dest[3] = cache_get_field_content_int(0"cofresalario");         FactionInfo[facid][cofresalario] = int_dest[3];
        
int_dest[4] = cache_get_field_content_int(0"cofrematerial");         FactionInfo[facid][cofrematerial] = int_dest[4];
        
int_dest[5] = cache_get_field_content_int(0"cofremaconha");         FactionInfo[facid][cofremaconha] = int_dest[5];
        
int_dest[6] = cache_get_field_content_int(0"EagleSPAWNfac");         FactionInfo[facid][EagleSPAWNfac] = int_dest[6];
        
int_dest[7] = cache_get_field_content_int(0"shotgunSPAWNfac");          FactionInfo[facid][shotgunSPAWNfac] = int_dest[7];
        
int_dest[8] = cache_get_field_content_int(0"spazSPAWNfac");             FactionInfo[facid][spazSPAWNfac] = int_dest[8];
        
int_dest[9] = cache_get_field_content_int(0"mp5SPAWNfac");           FactionInfo[facid][mp5SPAWNfac] = int_dest[9];
        
int_dest[10] = cache_get_field_content_int(0"akSPAWNfac");            FactionInfo[facid][akSPAWNfac] = int_dest[10];
        
int_dest[11] = cache_get_field_content_int(0"m4SPAWNfac");            FactionInfo[facid][m4SPAWNfac] = int_dest[11];
        
int_dest[12] = cache_get_field_content_int(0"rifleSPAWNfac");         FactionInfo[facid][rifleSPAWNfac] = int_dest[12];
        
int_dest[13] = cache_get_field_content_int(0"sniperSPAWNfac");        FactionInfo[facid][sniperSPAWNfac] = int_dest[13];
        
int_dest[14] = cache_get_field_content_int(0"meleeSPAWNfac");         FactionInfo[facid][meleeSPAWNfac] = int_dest[14];
    }

Reply


Messages In This Thread
Please help me to fix [load-mysql] - by maikons - 18.09.2015, 18:34
Re: Please help me to fix [load-mysql] - by Mister0 - 18.09.2015, 18:40
Re: Please help me to fix [load-mysql] - by maikons - 18.09.2015, 19:44
Re: Please help me to fix [load-mysql] - by Aliassassin123456 - 18.09.2015, 20:50
Re: Please help me to fix [load-mysql] - by maikons - 19.09.2015, 17:44

Forum Jump:


Users browsing this thread: 4 Guest(s)