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(id, szAuth, charsmax(szAuth));
new szKey[64], szData[255];
for( new i = 0; i < MAXCLASSES; i++ )
{
formatex(szData, charsmax(szData), "%s%i#%i#", szData, pInfo[id][i][EXP], pInfo[id][i][Level]);
}
formatex(szKey, charsmax(szKey), "%s-Mod", szAuth);
nvault_set(g_vault, szKey, szData);
}