27.05.2014, 03:32
Oee gente tb bem !! esto tentando fazer um comando de mudar o nick da pessoa dentro da pasta "contas" mas so que esta dando erros:
o CODIGO e:
if(strcmp(cmd, "/mudarnick", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new arq[50];
new Arquivo[50];
format(string, 256, "[ADMIN]: o play %s Mudou o nick para %s ", sendername,tmp);
SendClientMessageToAll(0x0084ffAA, string);
format(arq,sizeof arq, "contas/%s.ini",sendername);
frename(sendername(arq),tmp);
return 1;
}
Erros:
C:\Users\pedro-pc\Desktop\SAMP\admcopia .pwn(1903) : error 012: invalid function call, not avalid address
C:\Users\pedro-pc\Desktop\admcopia .pwn(1903) : warning 215: expression has no effect
C:\Users\pedro-pc\Desktop\admcopia .pwn(1903) : error 001: expected token: ";", but found ")"
C:\Users\pedro-pc\Desktop\admcopia .pwn(1903) : error 029: invalid expression, assumed zero
C:\Users\pedro-pc\Desktop\admcopia .pwn(1903) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Linha do Erro: frename(sendername(arq),tmp);
Alguem ajuda plis? vou dar reputacao pra quem conseguir me ajudar
o CODIGO e:
if(strcmp(cmd, "/mudarnick", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new arq[50];
new Arquivo[50];
format(string, 256, "[ADMIN]: o play %s Mudou o nick para %s ", sendername,tmp);
SendClientMessageToAll(0x0084ffAA, string);
format(arq,sizeof arq, "contas/%s.ini",sendername);
frename(sendername(arq),tmp);
return 1;
}
Erros:
C:\Users\pedro-pc\Desktop\SAMP\admcopia .pwn(1903) : error 012: invalid function call, not avalid address
C:\Users\pedro-pc\Desktop\admcopia .pwn(1903) : warning 215: expression has no effect
C:\Users\pedro-pc\Desktop\admcopia .pwn(1903) : error 001: expected token: ";", but found ")"
C:\Users\pedro-pc\Desktop\admcopia .pwn(1903) : error 029: invalid expression, assumed zero
C:\Users\pedro-pc\Desktop\admcopia .pwn(1903) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Linha do Erro: frename(sendername(arq),tmp);
Alguem ajuda plis? vou dar reputacao pra quem conseguir me ajudar