10.01.2013, 23:26
(
Последний раз редактировалось EAsT-OAK_510; 11.01.2013 в 00:09.
)
Errors:
My code for basically for offline ajail:
Код:
C:\Documents and Settings\Administrator\My Documents\New Folder (2)\gamemodes\DRP.pwn(15833) : error 033: array must be indexed (variable "playerb") C:\Documents and Settings\Administrator\My Documents\New Folder (2)\gamemodes\DRP.pwn(15835) : error 033: array must be indexed (variable "playerb") C:\Documents and Settings\Administrator\My Documents\New Folder (2)\gamemodes\DRP.pwn(15836) : error 033: array must be indexed (variable "playerb") C:\Documents and Settings\Administrator\My Documents\New Folder (2)\gamemodes\DRP.pwn(15838) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Administrator\My Documents\New Folder (2)\gamemodes\DRP.pwn(15839) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\Administrator\My Documents\New Folder (2)\gamemodes\DRP.pwn(15840) : error 033: array must be indexed (variable "playerb") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
pawn Код:
CMD:jailaccount(playerid, params[])
{
new playerb[32], string[128], file[32], time, RandomCell;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "uis[64]", playerb, time, params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /jailaccount [playername] [time] [reason]");
format(file, sizeof(file), "users/%s.ini", playerb);
if(!dini_Exists(file)) return SendClientMessage(playerid, COLOR_GREY, "Player name not found.");
if(time > 0)
{
PlayerInfo[playerb][pPrison] = 3;
PlayerInfo[playerb][pPrisonTime] = time*60;
format(PlayerInfo[playerb][pPrisonReason], 64, "%s", params);
format(PlayerInfo[playerb][pPrisonBy], 32, "%s", RPN(playerid));
RandomCell = random(sizeof(RandomCells));
SetPlayerFacingAngle(playerb, RandomCells[RandomCell][3]);
SetPlayerPos(playerb, RandomCells[RandomCell][0], RandomCells[RandomCell][1], RandomCells[RandomCell][2]);
format(string, sizeof(string), "AdmCmd: %s has been offline-ajailed for %d minute(s) by %s, reason: %s", playerb, PlayerInfo[playerb][pPrisonTime]/60, RPN(playerid), params);
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
return 1;
}