Smail [Help] +Rep
#1

Hello All
i Get This Error
Quote:

D:\ffff\gamemodes\textdraw.pwn(482) : warning 219: local variable "GetName" shadows a variable at a preceding level

PHP Code:
stock GetName(playerid)
{
     new 
GetName[MAX_PLAYER_NAME];
     
GetPlayerName(playeridGetNamesizeof(GetName));
     return 
GetName;

Reply
#2

you can't declare a variable with the same name of a function. so instead of new GetName write new Name
Reply
#3

Quote:
Originally Posted by Kimossab
View Post
you can't declare a variable with the same name of a function. so instead of new GetName write new Name
i will make new name and write it in my commands!
Reply
#4

Help Please!
Reply
#5

Remplace with is
PHP Code:
stock GetName(playerid)
{
    new 
plName[MAX_PLAYER_NAME];
    
GetPlayerName(playeridplNamesizeof(plName));
    return 
plName;

Reply
#6

Code:
stock GetName(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	return name;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)