heyho leute und zwar hab ich ein pn befehl in mein script iengebaut doch er sagt mir immer die errors
D:\samp server\eigener server neue version R4\samp03asvr_R7_win32\gamemodes\vl.pwn(507) : error 017: undefined symbol "strrest"
D:\samp server\eigener server neue version R4\samp03asvr_R7_win32\gamemodes\vl.pwn(507) : error 033: array must be indexed (variable "gMessage")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
mein script
new cmd[256];
new tmp[256];
new Message[256];
new gMessage[256];
new pName[MAX_PLAYER_NAME+1];
new iName[MAX_PLAYER_NAME+1];
new idx;
cmd = strtok(cmdtext, idx);
// PM Command
if(strcmp("/pm", cmd, true) == 0)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp) || strlen(tmp) > 5) {
SendClientMessage(playerid,0xFF444499,"Benutze: /pm (id) (nachricht)");
return 1;
}
new id = strval(tmp);
gMessage = strrest(cmdtext,idx);
if(!strlen(gMessage)) {
SendClientMessage(playerid,0xFF444499,"Benutze: /pm (id) (nachricht)");
return 1;
}
if(!IsPlayerConnected(id)) {
SendClientMessage(playerid,0xFF444499,"/pm : Diese ID ist nicht aktiv!");
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,0xFFCC2299,Message);
format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage);
SendClientMessage(id,0xFFFF22AA,Message);
PlayerPlaySound(id,1085,0.0,0.0,0.0);
printf("PM: %s",Message);
}
else {
SendClientMessage(playerid,0xFF444499,"Du kanst dir selber keine Nachricht schreiben!");
}
return 1;
}
line 507
gMessage = strrest(cmdtext,idx);