17.01.2012, 14:32
I have an enum/array for player data, but instead of having to put
pData[playerid][pName]
I tried this:
#define pName[%1] pData[%1][pName]
to allow me to just put
pName[playerid]
but I got a bunch of errors:
:/
Here's all the stuff:
pData[playerid][pName]
I tried this:
#define pName[%1] pData[%1][pName]
to allow me to just put
pName[playerid]
but I got a bunch of errors:
Quote:
(32) : error 001: expected token: "}", but found "[" (35) : error 021: symbol already defined: "pData" (71) : error 028: invalid subscript (not an array or too many subscripts): "pData" (71) : warning 215: expression has no effect (71) : error 001: expected token: ";", but found "]" (71) : error 029: invalid expression, assumed zero (71) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors. |
Here's all the stuff:
pawn Код:
#define pName[%1] pData[%1][pName]
enum E_PDATA
{
pLoginStatus,
pName[MAX_PLAYER_NAME] // Line 32
}
new pData[MAX_PLAY][E_PDATA]; // Line 35
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, pName[playerid], MAX_PLAYER_NAME); // Line 71
}