MySQL R40 Ranguri dinamice pentru Org.
#1

Salut la toti, am inceput a face un sistem cu ranguri dinamice.
PHP Code:
enum E_PLAYER_RANG_DATA{
    
ORM_r_ormid,
    
// mysql synced
    
id,
    
rang1[32],
    
rang2[32],
    
rang3[32],
    
rang4[32],
    
rang5[32],
    
rang6[32],
    
rang7[32],
    
rang8[32],
    
rang9[32],
    
rang10[32],
}
new 
RG[1][E_PLAYER_RANG_DATA]; 
PHP Code:
mysql_tquery(MySQL:1,"SELECT * FROM `rangs`""OnMySQL_SelectRangs"); 
PHP Code:
public OnMySQL_SelectRangs()
{
    new 
TotalRanks;
    for(new 
x=0sizeof(RG); x++){
        
RG[x][_r_ormid] = orm_create("rangs");
        
orm_addvar_int(RG[x][_r_ormid],RG[x][id],"ID");
        
orm_setkey(RG[x][_r_ormid],"ID");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang1], 32"Rang1");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang2], 32"Rang2");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang3], 32"Rang3");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang4], 32"Rang4");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang5], 32"Rang5");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang6], 32"Rang6");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang7], 32"Rang7");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang8], 32"Rang8");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang9], 32"Rang9");
        
orm_addvar_string(RG[x][_r_ormid],RG[x][rang10], 32"Rang10");
        
TotalRanks++;
    }
    
printf("Ranguri:%i       [Timp: %d ms]",TotalRanks,cache_get_query_exec_time(MILLISECONDS));

MySQL:

Dar, daca facem:
PHP Code:
 printf("%s"RG[0][rang10]; //imi da eruare 
Cine ma poate ajuta?
Va multumesc.
Reply
#2

Code:
printf("%s", RG[0][rang10];
in prima faza inchide si tu paranteza rotunda de la functie... ")" - is missing
Reply
#3

Quote:
Originally Posted by Jessyy
View Post
Code:
printf("%s", RG[0][rang10];
in prima faza inchide si tu paranteza rotunda de la functie... ")" - is missing
Am inchis-o, inca ziua trecuta, se compileaza bine, dar in consola apare loc gol..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)