[Ajuda] Times
#1

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.
Minha idйia й fazer um comando que crie um time(clan) para um gamemode de TDM. Alguйm pode me explicar por que esses erros aparecem e como solucionar?
Reply


Messages In This Thread
Times - by Paramount. - 26.04.2014, 04:39
Re: Times - by Dark.Angel - 26.04.2014, 07:25
Re: Times - by Fel486 - 26.04.2014, 13:10
Re: Times - by Paramount. - 26.04.2014, 13:10
Re: Times - by GWMPT - 26.04.2014, 14:03
Re: Times - by Fel486 - 26.04.2014, 14:10
Re: Times - by GWMPT - 26.04.2014, 14:29
Re: Times - by Fel486 - 26.04.2014, 14:44
Re: Times - by GWMPT - 26.04.2014, 14:48

Forum Jump:


Users browsing this thread: 3 Guest(s)