CMD:apagarrecordes(playerid, params[]) {
new Corrida[50], String[100];
if(sscanf(params, "s[50]", Corrida)) return SendClientMessage(playerid, -1, "Uso /apagarrecordes [Corrida]");
format(String, sizeof(String), "%s.txt", Corrida);
new File:Arquivo = fopen(String, io_append);
fremove(Arquivo);
new File:Arquivo = fopen(String, io_append);
fclose(Arquivo);
return 1;
}
C:\Users\usuario\Desktop\Brasil Racing\gamemodes\BrasilBeta.pwn(686) : error 035: argument type mismatch (argument 1) C:\Users\usuario\Desktop\Brasil Racing\gamemodes\BrasilBeta.pwn(687) : error 021: symbol already defined: "Arquivo" C:\Users\usuario\Desktop\Brasil Racing\gamemodes\BrasilBeta.pwn(685) : warning 204: symbol is assigned a value that is never used: "Arquivo"
Ola, queria que alguйm min ajudasse a fazer um cmd no meu gm que na hora que eu desse o cmd /apagarrecordes [nomedacorrida] - apagasse o que tinha dentro de scriptfiles - nomedacorrida.txt !
Obrigado por quem ajudar. |
CMD:apagarrecordes(playerid, params[]) {
new Corrida[50], String[100];
if(sscanf(params, "s[50]", Corrida)) return SendClientMessage(playerid, -1, "Uso /apagarrecordes [Corrida]");
format(String, sizeof(String), "%s.txt", Corrida);
new File:Arquivo = fopen(String, io_append);
fremove(Arquivo);
format(String, sizeof(String), "%s.txt", Corrida);
new File:ArquivoACriar = fopen(String, io_append);
fclose(ArquivoACriar);
return 1;
}
C:\Users\usuario\Desktop\Brasil Racing\gamemodes\BrasilBeta.pwn(681) : error 035: argument type mismatch (argument 1) C:\Users\usuario\Desktop\Brasil Racing\gamemodes\BrasilBeta.pwn(680) : warning 204: symbol is assigned a value that is never used: "Arquivo"
CMD:apagarrecordes(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, -1, "Use /apagarrecordes [corrida]");
format(params, 128, "%s.txt", params);
fclose(fopen(params, io_append));
return 1;
}
pawn Код:
|
C:\Users\usuario\Desktop\Brasil Racing\gamemodes\BrasilBeta.pwn(696) : error 033: array must be indexed (variable "params")
dcmd_apagarrecordes(playerid, params[])
#pragma unused params
#pragma unused playerid
{
if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, 0xFFFFFFAA,"{FF0000}[Fail] {FFFFFF}Desculpe, apenas os administradores podem usar esse comando!");
return 1;
}
new tmp1[255];
format(tmp1,sizeof(tmp1),"%s.txt", gTrackName);
SendClientMessage(playerid, 0xFFFFFFAA,"Vocк apagou resetou os recordes da corrida: Teste");
return 1;
}