Raised This Month: $ Target: $400
 0% 

I need on retrieveing individual data.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 02-10-2013 , 11:08   Re: I need on retrieveing individual data.
Reply With Quote #10

You still need this to print out the name of the class
PHP Code:
new const CLASSES[MAXCLASSES][] = 
{
    
"None",
    
"Dog",
    
"Cat",
    
"Horse",
    
"Cow"

To print out the class name
PHP Code:
CLASSES[PlayerClass[id]] 
Also change this
PHP Code:
while(pInfo[attacker][PlayerClass[attacker]][EXP] >= LEVELS[PlayerLevel[attacker]])  

to this
PHP Code:
if(pInfo[attacker][PlayerClass[attacker]][EXP] >= LEVELS[PlayerLevel[attacker]])  

Since you don't need a loop for that.

A typical save function would look something like this:
PHP Code:
public SaveData(id)
{
    new 
szAuth[35];
    
get_user_authid(idszAuthcharsmax(szAuth));
    
    new 
szKey[64], szData[255];
    for( new 
0MAXCLASSESi++ )
    {
        
formatex(szDatacharsmax(szData), "%s%i#%i#"szDatapInfo[id][i][EXP], pInfo[id][i][Level]);
    }
    
    
formatex(szKeycharsmax(szKey), "%s-Mod"szAuth);
    
    
nvault_set(g_vaultszKeyszData);

nnajko is offline
 



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

Forum Jump


All times are GMT -4. The time now is 20:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode