Account system problems..
#1

I got these errors

pawn Код:
C:\Users\Eric\Desktop\SA-MP Server\gamemodes\hg.pwn(78) : error 017: undefined symbol "PlayerInfo"
C:\Users\Eric\Desktop\SA-MP Server\gamemodes\hg.pwn(78) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Eric\Desktop\SA-MP Server\gamemodes\hg.pwn(110) : warning 213: tag mismatch
C:\Users\Eric\Desktop\SA-MP Server\gamemodes\hg.pwn(110) : error 001: expected token: ")", but found "["
C:\Users\Eric\Desktop\SA-MP Server\gamemodes\hg.pwn(110) : warning 215: expression has no effect
C:\Users\Eric\Desktop\SA-MP Server\gamemodes\hg.pwn(110) : error 001: expected token: ";", but found "]"
C:\Users\Eric\Desktop\SA-MP Server\gamemodes\hg.pwn(110) : error 029: invalid expression, assumed zero
C:\Users\Eric\Desktop\SA-MP Server\gamemodes\hg.pwn(110) : fatal error 107: too many error messages on one line
This is 78:
pawn Код:
new pInfo[MAX_PLAYERS][PlayerInfo];
and 110:
pawn Код:
INI_String("Password", pInfo[playerid][Pass],129);
also this forward doesnt seem to work? the "forward" isnt turning blue for me.

pawn Код:
forward loadaccount_user(playerid, name[], value[]);
Reply
#2

What's the whole enum for pInfo?
Reply
#3

It should be like:
pawn Код:
enum PlayerInfo
{
    // some others,
    Pass[ 129 ]
};

new
    pInfo[ MAX_PLAYERS ][ PlayerInfo ]
;
Reply
#4

this is everything:

pawn Код:
enum PlayerInfo
{
    Pass[129],
    Adminlevel,
    VIPlevel,
    Money,
    Scores,
    Kills,
    Deaths
}

public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", pInfo[playerid][Pass],129);
    INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);
    INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);
    INI_Int("Money",pInfo[playerid][Money]);
    INI_Int("Scores",pInfo[playerid][Scores]);
    INI_Int("Kills",pInfo[playerid][Kills]);
    INI_Int("Deaths",pInfo[playerid][Deaths]);
    return 1;
}

new pInfo[MAX_PLAYERS][PlayerInfo];
Reply
#5

Make sure that this:

pawn Код:
new pInfo[MAX_PLAYERS][PlayerInfo];
Is below the:

pawn Код:
enum PlayerInfo
{
    Pass[129],
    Adminlevel,
    VIPlevel,
    Money,
    Scores,
    Kills,
    Deaths
}
So, it should look like this:

pawn Код:
enum PlayerInfo
{
    Pass[129],
    Adminlevel,
    VIPlevel,
    Money,
    Scores,
    Kills,
    Deaths
}
new pInfo[MAX_PLAYERS][PlayerInfo];

public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", pInfo[playerid][Pass],129);
    INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);
    INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);
    INI_Int("Money",pInfo[playerid][Money]);
    INI_Int("Scores",pInfo[playerid][Scores]);
    INI_Int("Kills",pInfo[playerid][Kills]);
    INI_Int("Deaths",pInfo[playerid][Deaths]);
    return 1;
}
Reply
#6

Thanks that worked! +rep !
Reply
#7

Quote:
Originally Posted by Proph3t
Посмотреть сообщение
Thanks that worked! +rep !
No problem, and not criticizing you or anything, but you can't +rep until you have 50 posts and at least 1 rep.
Reply
#8

mhm anyway thanks ;p
Reply
#9

Removed - I should probably refresh pages more often xD
Reply
#10

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
Make sure this is below this;
pawn Код:
enum PlayerInfo
{
   //data
}
But above
pawn Код:
public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", pInfo[playerid][Pass],129);
    INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);
    INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);
    INI_Int("Money",pInfo[playerid][Money]);
    INI_Int("Scores",pInfo[playerid][Scores]);
    INI_Int("Kills",pInfo[playerid][Kills]);
    INI_Int("Deaths",pInfo[playerid][Deaths]);
    return 1;
}
Hey fellow UK'er, make sure you read the posts before that were posted before posting a new post, , the matter was already resolved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)