PDA

View Full Version : Few errors on this enum.


Nautic
30/03/2015, 05:42 AM
Hey all,

I'm new to the forums and I came across this error:

C:\Users\Troy\Desktop\Script\pawno\new.pwn(89) : error 017: undefined symbol "pData"
C:\Users\Troy\Desktop\Script\pawno\new.pwn(89) : warning 215: expression has no effect
C:\Users\Troy\Desktop\Script\pawno\new.pwn(89) : error 001: expected token: ";", but found "]"
C:\Users\Troy\Desktop\Script\pawno\new.pwn(89) : error 029: invalid expression, assumed zero
C:\Users\Troy\Desktop\Script\pawno\new.pwn(89) : 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.


in the following script:

enum PlayerData
{
ID,
pName[24],
Password[129],
IP[16],
Admin,

}
new pData[MAX_PLAYERS][PlayerData];


Anyone see anything wrong?

ATGOggy
30/03/2015, 05:43 AM
Try this:enum PlayerData
{
ID,
pName[24],
Password[129],
IP[16],
Admin
};
new pData[MAX_PLAYERS][PlayerData];

Nautic
30/03/2015, 05:53 AM
Try this:enum PlayerData
{
ID,
pName[24],
Password[129],
IP[16],
Admin
};
new pData[MAX_PLAYERS][PlayerData];


Thank you for the suggestion but I had to change the Password and IP string to pPassword and pIP.

Smileys
30/03/2015, 08:49 AM
Why would you want to save someone's password in an array anyway?

Vince
30/03/2015, 09:16 AM
Unlike you, perhaps, most people opt to use a stronger hashing algorithm than the abomination that's called udb_hash ...