Problem when loading factions
#1

Hi everyone, I have a loading problem in my faction system, when the stock LoadFactions () is called it does not load the factions, I believe the problem is in the cache_get_value that is not passing the database data to the variables because console show the correct number of the factions loaded, but the faction variables receive no data.
I already tried to fix it in several ways, changing the shape of the loop but without result, does anyone have an idea of how to fix it? Thank you in advance and sorry for my english, this is not my native language.
Here is the code
PHP код:
stock LoadFactions()
{
    new 
rows;
    new 
Cache:result;
    
result mysql_query(Connect"SELECT * FROM `factions`");
    if(
cache_get_row_count(rows))
    {
        for(new 
0rowsi++)
        {
            
cache_get_value_int(i"fID"Factions[i][fID]);
            
cache_get_value_int(i"fLeaderID"Factions[i][fLeaderID]);
            
cache_get_value_name(i"fLeaderName"Factions[i][fLeaderName]);
            
cache_get_value_name(i"fNome"Factions[i][fNome]);
            
cache_get_value_name(i"fTag",Factions[i][fTag]);
            
cache_get_value_name(i"Cargo1Faction"Factions[i][Cargo1Faction]);
            
cache_get_value_name(i"Cargo2Faction"Factions[i][Cargo2Faction]);
            
cache_get_value_name(i"Cargo3Faction",Factions[i][Cargo3Faction]);
            
cache_get_value_name(i"Cargo4Faction",Factions[i][Cargo4Faction]);
            
cache_get_value_name(i"Cargo5Faction",Factions[i][Cargo5Faction]);
            
cache_get_value_int(i"fKScore"Factions[i][fKScore]);
            
cache_get_value_int(i"fDScore"Factions[i][fDScore]);
            
cache_get_value_int(i"fCarteira"Factions[i][fCarteira]);
        }
    }
    
printf("[Faction] - %i Facзхes foram carregadas!"rows);
    
Total_Factions_Created rows;
    
cache_delete(result);
    return 
1;

Reply


Messages In This Thread
Problem when loading factions - by JhonnyMonroe - 31.05.2018, 20:40
Re: Problem when loading factions - by JhonnyMonroe - 31.05.2018, 23:01
Re: Problem when loading factions - by TheOmnitrix - 01.06.2018, 00:06
Re: Problem when loading factions - by JhonnyMonroe - 01.06.2018, 00:40
Re: Problem when loading factions - by Sew_Sumi - 01.06.2018, 02:24
Re: Problem when loading factions - by GTLS - 01.06.2018, 05:41
Re: Problem when loading factions - by TheOmnitrix - 01.06.2018, 14:47

Forum Jump:


Users browsing this thread: 1 Guest(s)