2 errors for pm..
#1

Код:
C:\Users\Andy\Desktop\SRP.pwn(8406) : error 017: undefined symbol "strrest"
C:\Users\Andy\Desktop\SRP.pwn(8406) : error 033: array must be indexed (variable "gMessage")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
it was copied from the base.pwn.. but i go to put it in the gamemode.. add a few things.. still get this..
the /pm code of /base..
Код:
if(strcmp("/pm", cmd, true) == 0)
{
tmp = strtok(cmdtext,idx);

if(!strlen(tmp) || strlen(tmp) > 5) {
SendClientMessage(playerid,COLOR_YELLOW,"Usage: /pm (id) (message)");
return 1;
}

new id = strval(tmp);
gMessage = strrest(cmdtext,idx);

if(!strlen(gMessage)) {
SendClientMessage(playerid,COLOR_YELLOW,"Usage: /pm (id) (message)");
return 1;
}

if(!IsPlayerConnected(id)) {
SendClientMessage(playerid,COLOR_YELLOW,"/pm : Bad player ID");
return 1;
}

if(playerid != id) {
GetPlayerName(id,iName,sizeof(iName));
GetPlayerName(playerid,pName,sizeof(pName));
format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
SendClientMessage(playerid,COLOR_YELLOW,Message);
format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage);
SendClientMessage(id,COLOR_YELLOW,Message);
PlayerPlaySound(id,1085,0.0,0.0,0.0);

printf("PM: %s",Message);

}
else {
SendClientMessage(playerid,COLOR_YELLOW,"You cannot PM yourself");
}
return 1;
}
all i did was edit the color.. COLOR_FS admin or something to COLOR_YELLOW..
to the ones who do help , thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)