SA-MP Forums Archive
Scrip error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Scrip error (/showthread.php?tid=93579)



Scrip error - pablodc - 25.08.2009

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


Re: Scrip error - Memoryz - 25.08.2009

Well, which line is 1114 and which is 1120?


Re: Scrip error - MadeMan - 25.08.2009

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



Re: Scrip error - pablodc - 25.08.2009

This

Quote:

GetPlayerName(playerid,playername,24);

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




Re: Scrip error - pablodc - 25.08.2009

THX YOU