SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Romnă/Romanian

Reply
 
Thread Tools Display Modes
Old 18/02/2017, 08:45 AM   #1
Johhnyllll
Huge Clucker
 
Johhnyllll's Avatar
 
Join Date: Sep 2014
Posts: 217
Reputation: 8
Default MySQL R40 Ranguri dinamice pentru Org.

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.
__________________
: GitHub
Johhnyllll is offline   Reply With Quote
Old 18/02/2017, 04:41 PM   #2
Jessyy
Huge Clucker
 
Join Date: May 2009
Posts: 242
Reputation: 91
Default Re: MySQL R40 Ranguri dinamice pentru Org.

Code:
printf("%s", RG[0][rang10];
in prima faza inchide si tu paranteza rotunda de la functie... ")" - is missing
__________________
Always have your stuff when you need it with Dropbox. 2GB account is free! https://db.tt/R3HuiXZk
Works at loading... Please wait ███████████████]99.9%
Jessyy is offline   Reply With Quote
Old 19/02/2017, 09:41 AM   #3
Johhnyllll
Huge Clucker
 
Johhnyllll's Avatar
 
Join Date: Sep 2014
Posts: 217
Reputation: 8
Default Re: MySQL R40 Ranguri dinamice pentru Org.

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..
__________________
: GitHub
Johhnyllll is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[GameMode] MySQL R33 - Ideal pentru RPG WopsS Salonul Scripturilor 107 23/01/2017 09:13 AM
Gamemode MySQL pentru incepatori Arrseon Romnă/Romanian 1 02/04/2016 07:19 PM
[Map] [Map]Cabana pentru 0.3c abcdef Salonul Scripturilor 11 07/10/2013 10:22 AM
TD pentru War myhaitza97 Romnă/Romanian 3 08/11/2012 01:09 PM
Syntaxa corecta pentru salvare MySQL exDDDD Romnă/Romanian 6 25/02/2011 10:06 PM


All times are GMT. The time now is 03:39 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.