Few errors on this enum.
#1

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 © 1997-2006, ITB CompuPhase


4 Errors.
in the following script:

pawn Код:
enum PlayerData
{
    ID,
    pName[24],
    Password[129],
    IP[16],
    Admin,

}
new pData[MAX_PLAYERS][PlayerData];

Anyone see anything wrong?
Reply
#2

Try this:
PHP код:
enum PlayerData
{
    
ID,
    
pName[24],
    
Password[129],
    
IP[16],
    
Admin
};
new 
pData[MAX_PLAYERS][PlayerData]; 
Reply
#3

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Try this:
PHP код:
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.
Reply
#4

Why would you want to save someone's password in an array anyway?
Reply
#5

Unlike you, perhaps, most people opt to use a stronger hashing algorithm than the abomination that's called udb_hash ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)