08.07.2010, 21:08
Hey,
I'm trying to create a clan system, it got bad at /creataclan command.
Here's a bit of the code, where the sendername jumps in.
The point is, I get "undefined symbol: "sendername".
I placed new sendername[MAX_PLAYERS];, new sendername[MAX_PLAYER_NAME]; all around the script, right below the OnPlayerCommandText, top of the script, in the command. It always happens.
Does anyone know what to do? Thanks.
I'm trying to create a clan system, it got bad at /creataclan command.
Here's a bit of the code, where the sendername jumps in.
pawn Код:
if(strcmp(cmdtext, "/createclan", true) == 0)
{
if(playerclan[playerid] != 99) return SendClientMessage(playerid,COLOR_ORANGE,"You're already in a Clan!");
new reason[10];
new cid = 99;
format(reason,sizeof(reason),"%s",bigstrtok(cmdtext, idx));
if(!strlen(reason))
{
SendClientMessage(playerid, COLOR_ORANGE, "/creatclan [clan name]");
return 1;
}
for(new i = 9; i > -1; i--)
{
if (strcmp(clannames[i]," ",true) == 0 || !strlen(clannames[i])) cid = i;
}
if (cid == 99) return SendClientMessage(playerid,COLOR_ORANGE,"There are too many clans on the server!");
GetPlayerName(playerid, sendername, sizeof(sendername));
playerclan[playerid] = cid;
format(clannames[cid],10,"%s",reason);
format(string, sizeof(string), "You have succesfully creat clan - %s",clannames[cid]);
SendClientMessage(playerid,CLANTEXT, string);
clanjoin[playerid] = 1;
return 1;
}
I placed new sendername[MAX_PLAYERS];, new sendername[MAX_PLAYER_NAME]; all around the script, right below the OnPlayerCommandText, top of the script, in the command. It always happens.
Does anyone know what to do? Thanks.