enum problem.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: enum problem.. (
/showthread.php?tid=468311)
enum problem.. -
CesarLT - 07.10.2013
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.
Re: enum problem.. - Patrick - 07.10.2013
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
Re: enum problem.. -
CesarLT - 07.10.2013
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;
}
Re: enum problem.. -
dusk - 07.10.2013
pawn Код:
enum pInfo
{
pPass,
pCash,
pAdmin,
pKills,
pDeaths,
pScore //line 80
}
All that was wrong was a missing ','
Re: enum problem.. - Patrick - 07.10.2013
Here you go!
pawn Код:
enum pInfo
{
pPass,
pCash,
pAdmin,
pKills,
pDeaths, // you forgot a 'Comma'
pScore //line 80
}
EDIT: Too late
Re: enum problem.. -
CesarLT - 07.10.2013
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!