deu bastante erros alguns eu arremei sobrou 7 e nao consigo arrumo
pawn Код:
if (strcmp("/pm", cmdtext, true, 10) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, -1, "/PM [ID] [Mensagem]");
return 1;
}
new idx;
new playa;
new message[250];
if(IsNumeric(tmp))
{
playa = strval(tmp);
}
else
{
SendClientMessage(playerid, -1, "[ERRO]: Jogador nгo conectado");
return 1;
}
if(!IsPlayerConnected(playa))
{
SendClientMessage(playerid, -1, "[ERRO]: Jogador nгo conectado");
return 1;
}
if(playa == playerid)
{
SendClientMessage(playerid, -1, "[ERRO]: Vocк nгo pode enviar pm para sн mesmo");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, -1, "[ERRO]: Digite uma mensagem! e.e");
return 1;
}
format(message,sizeof(message),"PM de %s[%d]: %s",oGetPlayerName(playerid),playerid,result);
GameTextForPlayer(playa, " ~n~~n~~n~~n~~b~MENSAGEM RECEBIDA", 5000, 3);
SendClientMessage(playa, -1, message);
PlayerPlaySound(playa,1057,0.0,0.0,0.0);
format(message,sizeof(message),"PM para %s[%d]: %s",oGetPlayerName(playa),playa,result);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~g~MENSAGEM ENVIADA", 5000, 3);
SendClientMessage(playerid, -1, message);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
erros:
Код:
C:\Documents and Settings\Lucas\Desktop\GM.pwn(261) : error 017: undefined symbol "tmp"
C:\Documents and Settings\Lucas\Desktop\GM.pwn(261) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Lucas\Desktop\GM.pwn(262) : error 017: undefined symbol "tmp"
C:\Documents and Settings\Lucas\Desktop\GM.pwn(270) : error 017: undefined symbol "IsNumeric"
C:\Documents and Settings\Lucas\Desktop\GM.pwn(272) : error 017: undefined symbol "tmp"
C:\Documents and Settings\Lucas\Desktop\GM.pwn(307) : error 017: undefined symbol "oGetPlayerName"
C:\Documents and Settings\Lucas\Desktop\GM.pwn(311) : error 017: undefined symbol "oGetPlayerName"
C:\Documents and Settings\Lucas\Desktop\GM.pwn(362) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
7 Errors.