*** Not a descriptive title - ******.
#1

Quote:

D:\Server\filterscripts\MyScript.pwn(146) : warning 225: unreachable code
D:\Server\filterscripts\MyScript.pwn(146) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

146 problem
Quote:

GetPlayerName(playerid,name,sizeof(name));

Please help me
Reply
#2

??

well you show the full code!!!??
Reply
#3

Quote:

dcmd_getname(playerid,params[])
{
new id;
new string[64];
new name[MAX_PLAYER_NAME];
if(!strlen(params)) return SendClientMessage(playerid,0xFFFF00AA,"USAGE: /Getname [playerid]");
{
else if (!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFFFF00AA,"Player is not connected");
else
{
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"PlayerName is: %s[ID:%d]",name,id);
SendClientMessage(playerid,0xFFFF00AA,string);
}
return 1;
}
}

this full code
Reply
#4

pawn Код:
dcmd_getname(playerid,params[])
{
new id;
new string[64];
new name[MAX_PLAYER_NAME];
if(!strlen(params)) return SendClientMessage(playerid,0xFFFF00AA,"USAGE: /Getname [playerid]");
{
else if (!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFFFF00AA,"Player is not connected");
else
{
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"PlayerName is: %s[ID:%d]",name,id);
SendClientMessage(playerid,0xFFFF00AA,string);
}
}
return 1;
}
u had a problem with the return 1; location

FIXED
Reply
#5

loose idention. Here.

pawn Код:
dcmd_getname(playerid,params[])
{
    new id;
    new string[64];
    new name[MAX_PLAYER_NAME];
    if(!strlen(params)) return SendClientMessage(playerid,0xFFFF00AA,"USAGE: /Getname [playerid]");
    if (!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFFFF00AA,"Player is not connected");
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"PlayerName is: %s[ID:%d]",name,id);
    SendClientMessage(playerid,0xFFFF00AA,string);
    return 1;
}
Reply
#6

thanks but i need full cmd getname
Reply
#7

It's already full cmd or do you want use it with parameters.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)