Register system problem.
#1

Hello, I am new to scripting and I am making a Deathmatch gamemode. I just started and I have a little knowledge about scripting, I recently started on learning Dini & Dutils and I have a problem.

pawn Код:
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(76) : error 017: undefined symbol "gPlayerLogged"
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(76) : warning 215: expression has no effect
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(76) : error 001: expected token: ";", but found "]"
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(76) : error 029: invalid expression, assumed zero
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(76) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
My line 76:

pawn Код:
gPlayerLogged[playerid] = 0;
Could someone help me out?
Reply
#2

pawn Код:
//Put this under the includes
new gPlayerLogged[MAX_PLAYERS];
Reply
#3

Now I got this:

pawn Код:
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 001: expected token: ",", but found "["
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 029: invalid expression, assumed zero
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 017: undefined symbol "pScore"
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : fatal error 107: too many error messages on one line
pawn Код:
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
Reply
#4

Make sure you have pScore under your Player enum
pawn Код:
enum pInfo
{
  pScore
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#5

I have..

pawn Код:
enum pInfo
{
    pAdminLevel,
    pCash,
    pScore,
}

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

Remove the , after the score.

pawn Код:
enum pInfo
{
    pAdminLevel,
    pCash,
    pScore
}

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

Nothing happend, still the same

pawn Код:
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 001: expected token: ",", but found "["
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 029: invalid expression, assumed zero
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 017: undefined symbol "pScore"
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : fatal error 107: too many error messages on one line
pawn Код:
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
Reply
#8

pawn Код:
enum pInfo
{
    pAdminLevel,
    pCash,
    pScore,
};

new PlayerInfo[MAX_PLAYERS][pInfo];
Try that.
Reply
#9

I do not recommend these dini, yini's better
Reply
#10

Quote:
Originally Posted by zClaw
Посмотреть сообщение
Nothing happend, still the same

pawn Код:
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 001: expected token: ",", but found "["
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 029: invalid expression, assumed zero
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : error 017: undefined symbol "pScore"
C:\Users\Gast\Desktop\SA-MP Server\pawno\Register login.pwn(100) : fatal error 107: too many error messages on one line
pawn Код:
dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]);
Have you formated file? Something like:

pawn Код:
new file[32];
format(file,sizeof(file),"/Users/%s.ini", GetName(playerid));
I can't think of anything else that could cause it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)