PDA

View Full Version : undefined symbol "GetName"


EzioRock
17/05/2014, 08:15 AM
I get an error.I searched everywhere ut didnt find the solution so..plz help me fix it.

2 errors

C:\Users\user\Desktop\Xtream Gaming\filterscripts\LuxAdmin.pwn(6067) : error 017: undefined symbol "GetName"
C:\Users\user\Desktop\Xtream Gaming\filterscripts\LuxAdmin.pwn(6076) : error 017: undefined symbol "GetName"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

Line 6067 format(string, 128, "Admin %s is Now Onduty! ", GetName(playerid));
Line 6076 format(string, 128, "Admin %s is Now Offduty! ", GetName(playerid));

Im new At scripting..

SAMProductions
17/05/2014, 08:21 AM
Add This on the same place :-
new GetName[MAX_PLAYER_NAME];
GetPlayerName(playerid, GetName, sizeof(GetName));

or Add This somewhere in your GameMode :-
stock GetName(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}

Smileys
17/05/2014, 08:22 AM
do you have a function called GetName( playerid )?

if not, add this;


stock GetName( playerid )
{
new pName[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, pName, sizeof( pName ) );
return pName;
}

EzioRock
17/05/2014, 08:27 AM
Thx a lot guys +rep to All 3