Scrip error
#1

I have this error:

Quote:

C:\Users\Pablo\Desktop\Sona GM\gamemodes\Sona.pwn(1114) : error 017: undefined symbol "playername"
C:\Users\Pablo\Desktop\Sona GM\gamemodes\Sona.pwn(1120) : error 017: undefined symbol "playername"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

This is the scrip

Quote:

if (strcmp(cmdtext, "/me", true)==0)
{
new string[120];
GetPlayerName(playerid,playername,24);
if(!strlen(cmdtext))
{
SendClientMessage(playerid,COLOR_GREY,"Usage: /me [action]");
return 1;
}
format(string,sizeof(string),"%s %s",playername,cmdtext[0]);
for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) if(GetDistanceBetweenPlayers(playerid,i) <= 30 && i!=playerid)
{
SendClientMessage(i,COLOR_PURPLE,string);
SendClientMessage(playerid,COLOR_PURPLE,string);
return 1;
}
return 1;
}

Help plz
Reply
#2

Well, which line is 1114 and which is 1120?
Reply
#3

pawn Код:
new string[120];
new playername[24];
GetPlayerName(playerid,playername,24);
Reply
#4

This

Quote:

GetPlayerName(playerid,playername,24);

format(string,sizeof(string),"%s %s",playername,cmdtext[0]);

Reply
#5

THX YOU
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)