08.06.2011, 15:58
Well i read this tutorial, and thought to start making macros,
But now i am getting error's while using them
And im getting errors.
Error line is
But now i am getting error's while using them
pawn Код:
#define GetPName(%0) do{new p_name[MAX_PLAYER_NAME]; GetPlayerName(%0,p_name,sizeof(p_name)); return p_name;}
pawn Код:
public OnPlayerConnect(playerid)
{
format(file,sizeof(file),Userfile,GetPName(playerid));
return 1;
}
Quote:
C:\Users\Admin\Desktop\Untitled.pwn(51) : error 029: invalid expression, assumed zero C:\Users\Admin\Desktop\Untitled.pwn(51) : error 090: public functions may not return arrays (symbol "OnPlayerConnect") C:\Users\Admin\Desktop\Untitled.pwn(51) : warning 217: loose indentation C:\Users\Admin\Desktop\Untitled.pwn(51) : error 029: invalid expression, assumed zero C:\Users\Admin\Desktop\Untitled.pwn(51) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
pawn Код:
format(file,sizeof(file),Userfile,GetPName(playerid));