Define error
#1

hi, i followed a tutorial for a simple admin system, but on compiling i get this:

Код:
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : error 017: undefined symbol "PInfo"
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : warning 215: expression has no effect
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : error 001: expected token: ";", but found "]"
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : error 029: invalid expression, assumed zero
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
But it is...

Код:
new PInfo[MAX_PLAYERS][Playerinfo]; //Variable that stores enumerator above
Line of error:
Код:
public OnPlayerDisconnect(playerid,reason)
{
    PInfo[playerid][Logged] = 0;//Setting the logged in variable to 0.
    return 1;
}
Reply
#2

show full line 85,
show full enum
Reply
#3

can you show us the Playerinfo enumerator please.
Reply
#4

Is the enum and this line:
pawn Код:
new PInfo[MAX_PLAYERS][Playerinfo];
BEFORE line 85? If not, they should so it will be a defined symbol.
Reply
#5

Код:
new PInfo[MAX_PLAYERS][Playerinfo]; //Variable that stores enumerator above

enum PlayerInfo
{
    Logged,//To check if the player is logged in
    Level,//To check the player's admin level
}
Line 85
Код:
    PInfo[playerid][Logged] = 0;//Setting the logged in variable to 0.
Reply
#6

enum should be above the declaration of the array and the names do not match.

pawn Код:
enum PlayerInfo
{
    Logged,
    Level
};

new PInfo[MAX_PLAYERS][PlayerInfo];

// Code below that uses PInfo..
Reply
#7

you should first create the enumerator, then the array.

also make sure the array and enumerator is ontop of your script under includes and defines.
Reply
#8

This is what i have now

Код:
enum PlayerInfo
{
    Logged,
    Level
};

new PInfo[MAX_PLAYERS][PlayerInfo];
Under the #Define areas

same errors on compile ;o
Reply
#9

Quote:
Originally Posted by luckie12
Посмотреть сообщение
This is what i have now

Код:
enum PlayerInfo
{
    Logged,
    Level
};

new PInfo[MAX_PLAYERS][PlayerInfo];
Under the #Define areas

same errors on compile ;o
show us the errors again please, perhaps its on a different line, or something else.
Reply
#10

Here you go

Код:
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : error 017: undefined symbol "PInfo"
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : warning 215: expression has no effect
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : error 001: expected token: ";", but found "]"
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : error 029: invalid expression, assumed zero
C:\Users\Luc\Documents\Samp server\filterscripts\registers.pwn(85) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)