SA-MP Forums Archive
Few errors on this enum. - 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: Few errors on this enum. (/showthread.php?tid=569373)



Few errors on this enum. - Nautic - 30.03.2015

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?


Re: Few errors on this enum. - ATGOggy - 30.03.2015

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



Re: Few errors on this enum. - Nautic - 30.03.2015

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.


Re: Few errors on this enum. - Smileys - 30.03.2015

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


Re: Few errors on this enum. - Vince - 30.03.2015

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