14.07.2011, 16:04
(
Последний раз редактировалось stefan2105; 15.07.2011 в 17:04.
)
Hi everyone,
I need some help;
When i compile it,i get this:
The line with the error is this:
Please help.
I need some help;
Код:
dcmd_akill(playerid, params[]) { if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[AKILL]) { new string[100]; format(string, sizeof(string), "You must be administrator level %d to use that command!", gCommands[AKILL]); return SendClientMessage(playerid, COLOUR_ORANGE, string); } else if(!strlen(params)) return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /akill [id | name]"); else { new id = (isNumeric(params)) ? strval(params) : GetPlayerId(params); if(IsPlayerConnected(id) && id != playerid) { SetPlayerHealth(id, 0.0); new string[128]; format(string, sizeof(string), "You have been admin-killed by administrator \'%s\'.", gPlayerInfo[playerid][PLAYER_NAME]); SendClientMessage(id, COLOUR_ORANGE, string); format(string, sizeof(string), "You have successfully admin-killed player \'%s\'.", gPlayerInfo[id][PLAYER_NAME]); return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string); } else return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You can not admin-kill yourself or a disconnected player."); } }
Код:
C:\Users\Djokic\Desktop\Skripte\pawno\admin.pwn(332) : error 033: array must be indexed (variable "params") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
new id = (isNumeric(params)) ? strval(params) : GetPlayerId(params);