enum problem..
#1

Hello everyone, I am trying to add "pScore" to the enum used at this tutorial:

http://forum.sa-mp.com/showthread.ph...egister+system

But, I am getting this errors:

pawn Код:
C:\Users\\Desktop\\gamemodes\(80) : error 001: expected token: "}", but found "-identifier-"
C:\Users\\Desktop\\gamemodes\(92) : error 017: undefined symbol "pScore"
C:\Users\\Desktop\\gamemodes\(968) : error 017: undefined symbol "pScore"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
I've added all the lines, which continue the INI writing, and everything.

Thanks ahead for the help.
Reply
#2

pawn Код:
enum pInfo
{
    pScore
}
new PlayerInfo[MAX_PLAYERS][pInfo];
make sure you have something like that.

It would really help us if you show us your code
Reply
#3

Quote:
Originally Posted by pds2012
Посмотреть сообщение
pawn Код:
enum pInfo
{
    pScore
}
new PlayerInfo[MAX_PLAYERS][pInfo];
make sure you have something like that.

It would really help us if you show us your code
Well, here how it looks for me:

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths
    pScore //line 80
}
new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("Score", PlayerInfo[playerid][pScore]); //line 92
    return 1;
}


stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}
Reply
#4

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths,
    pScore //line 80
}
All that was wrong was a missing ','
Reply
#5

Here you go!

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths, // you forgot a 'Comma'
    pScore //line 80
}
EDIT: Too late
Reply
#6

Quote:
Originally Posted by dusk
Посмотреть сообщение
pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths,
    pScore //line 80
}
All that was wrong was a missing ','
Quote:
Originally Posted by pds2012
Посмотреть сообщение
Here you go!

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths, // you forgot a 'Comma'
    pScore //line 80
}
EDIT: Too late
Lol, stupid me, thanks guys!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)