SA-MP Forums Archive
Account system problems.. - 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: Account system problems.. (/showthread.php?tid=464862)



Account system problems.. - Proph3t - 19.09.2013

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[]);



Re: Account system problems.. - DanishHaq - 19.09.2013

What's the whole enum for pInfo?


Re: Account system problems.. - Konstantinos - 19.09.2013

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

new
    pInfo[ MAX_PLAYERS ][ PlayerInfo ]
;



Re: Account system problems.. - Proph3t - 19.09.2013

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];



Re: Account system problems.. - DanishHaq - 19.09.2013

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;
}



Re: Account system problems.. - Proph3t - 19.09.2013

Thanks that worked! +rep !


Re: Account system problems.. - DanishHaq - 19.09.2013

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.


Re: Account system problems.. - Proph3t - 19.09.2013

mhm anyway thanks ;p


Re: Account system problems.. - EiresJason - 19.09.2013

Removed - I should probably refresh pages more often xD


Re: Account system problems.. - DanishHaq - 19.09.2013

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.