#define GetPName(%0) do{new p_name[MAX_PLAYER_NAME]; GetPlayerName(%0,p_name,sizeof(p_name)); return p_name;}
public OnPlayerConnect(playerid)
{
format(file,sizeof(file),Userfile,GetPName(playerid));
return 1;
}
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. |
format(file,sizeof(file),Userfile,GetPName(playerid));
#define GetPName(%0,%1) new p_name[50], file[256]; GetPlayerName(%0, p_name, 50); format(file, sizeof(file), %1, p_name)
public OnPlayerConnect(playerid)
{
GetPName(playerid, "UserName: %s");
printf(file);
return 1;
}