21.06.2017, 20:35
Como corrigir esses 3 errinhos?
Codigo:
Erros:
Codigo:
Код:
CMD:reportar(playerid, params[]) return cmd_report(playerid, params);
CMD:report(playerid, params[])
{
params = strtok(cmd_reportar, idx);
if(!strlen(params)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /reportar [id] [motivo]");
playerid = strval(params);
new reportado[MAX_PLAYER_NAME], reportador[MAX_PLAYER_NAME], motivo[128];
GetPlayerName(playerid, reportado, sizeof(reportado));
GetPlayerName(playerid, reportador, sizeof(reportador));
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFFFFFFAA, "Error: Jogador off.");
if(playerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFAA, "ERROR: Jogador invбlido.");
motivo = strtok(cmd, idx);
if(!strlen(motivo)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /reportar [id] [motivo]");
new string[128];
format(string, sizeof(string), "Jogador %s[%i] reportou %s[%i] motivo %s", reportador, playerid, reportado, playerid, motivo);
SendClientMessage(playerid, 0xFFFFFFAA, "[js] Relatуrio enviado.");
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerAdmin(i))
{
SendClientMessage(playerid, 0xFFFFFFAA, string);
}
}
return 1;
}
Код:
(52161) : error 046: unknown array size (variable "params") (52161) : error 076: syntax error in the expression, or invalid function call (52169) : error 017: undefined symbol "idx"


