26.04.2014, 04:39
PHP код:
#include a_samp
#include sscanf2
#include zcmd
#include DOF2
#define MAX_TIMES 25
enum tInfo {
tKills,
tMortes,
tDinheiro,
tNivel,
tPontos,
tRank
};
new TimeInfo[MAX_TIMES][tInfo];
CMD:criartime(playerid,params[])
{
format(pArquivo,sizeof(pArquivo),CAMINHO_CONTAS,pNome(playerid));
if(PlayerInfo[playerid][pLider] == true) return SendClientMessage(playerid,-1,"Vocк jб й lider de um time.");
new NomeTime[40],esc[40];
if(sscanf(params,"s",esc)) return SendClientMessage(playerid,-1,"Servidor: use /criartime [nome]");
format(NomeTime,sizeof(NomeTime),CAMINHO_TIMES,esc);
DOF2_CreateFile(esc);
DOF2_SetInt(esc,"Cofre",TimeInfo[MAX_TIMES][tDinheiro]); //239
DOF2_SetInt(esc,"Nivel",TimeInfo[MAX_TIMES][tNivel]); //240
DOF2_SaveFile();
return 1;
}
Код HTML:
C:\Users\Win 7\Desktop\samp\SAWARS\gamemodes\SAWARS.pwn(239) : error 032: array index out of bounds (variable "TimeInfo") C:\Users\Win 7\Desktop\samp\SAWARS\gamemodes\SAWARS.pwn(240) : error 032: array index out of bounds (variable "TimeInfo") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.