public LoadVip()
{
new arrCoords[5][100];
new strFromFile2[100];
new File: file = fopen("JogadoresUltimates/Vips.cfg", io_read);
if (file)
{
new idx = 0;
while(idx < sizeof(VipInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
strmid(VipInfo[idx][vNick], arrCoords[0], 0, strlen(arrCoords[0]), 255);
VipInfo[idx][vDia] = strval(arrCoords[1]);
VipInfo[idx][vMes] = strval(arrCoords[2]);
VipInfo[idx][vAno] = strval(arrCoords[3]);
VipInfo[idx][vMesesVIP] = strval(arrCoords[4]);
idx++;
}
}
fclose(file);
return 1;
}
public LoadVip()
{
new arrCoords[5][100];
new strFromFile2[100];
new File: file = fopen("JogadoresUltimates/Vips.cfg", io_read);
if (fexist(file))
{
new idx = 0;
while(idx < sizeof(VipInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
strmid(VipInfo[idx][vNick], arrCoords[0], 0, strlen(arrCoords[0]), 255);
VipInfo[idx][vDia] = strval(arrCoords[1]);
VipInfo[idx][vMes] = strval(arrCoords[2]);
VipInfo[idx][vAno] = strval(arrCoords[3]);
VipInfo[idx][vMesesVIP] = strval(arrCoords[4]);
idx++;
}
}
fclose(file);
return 1;
}
split(strFromFile2, arrCoords, '|');
new VipGrana;
enum vinfo
{
vNick[MAX_PLAYER_NAME],
vDia,
vMes,
vAno,
vMesesVIP,
};
new VipInfo[21][vinfo];
forward VipCheck(playerid);
forward VipVaga();
public VipVaga()
{
for(new idx=0; idx<sizeof(VipInfo); idx++)
{
if(strcmp(VipInfo[idx][vNick],"Ninguem", true ) == 0 );
{
VagaSobrando = 1;
return 1;
}
}
VagaSobrando = 0;
return 0;
}
forward LoadVip();
forward SaveVip();
public SaveVip()
{
new idx;
new File: file2;
while (idx < sizeof(VipInfo))
{
new coordsstring[128];
format(coordsstring, sizeof(coordsstring), "%s|%d|%d|%d|%d\n",VipInfo[idx][vNick],VipInfo[idx][vDia],VipInfo[idx][vMes],VipInfo[idx][vAno],VipInfo[idx][vMesesVIP]);
if(idx == 0)
{
file2 = fopen("JogadoresUltimates/Vips.cfg", io_write);
}
else
{
file2 = fopen("JogadoresUltimates/Vips.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}
public LoadVip()
{
new arrCoords[5][100];
new strFromFile2[100];
new File: file = fopen("JogadoresUltimates/Vips.cfg", io_read);
if (fexist(file))
{
new idx = 0;
while(idx < sizeof(VipInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
strmid(VipInfo[idx][vNick], arrCoords[0], 0, strlen(arrCoords[0]), 255);
VipInfo[idx][vDia] = strval(arrCoords[1]);
VipInfo[idx][vMes] = strval(arrCoords[2]);
VipInfo[idx][vAno] = strval(arrCoords[3]);
VipInfo[idx][vMesesVIP] = strval(arrCoords[4]);
idx++;
}
}
fclose(file);
return 1;
}
public LoadVip()
{
new arrCoords[5][100];
new strFromFile2[100];
new File: file = fopen("JogadoresUltimates/Vips.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(VipInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
strmid(VipInfo[idx][vNick], arrCoords[0], 0, strlen(arrCoords[0]), 255);
VipInfo[idx][vDia] = strval(arrCoords[1]);
VipInfo[idx][vMes] = strval(arrCoords[2]);
VipInfo[idx][vAno] = strval(arrCoords[3]);
VipInfo[idx][vMesesVIP] = strval(arrCoords[4]);
idx++;
}
fclose(file);
}
return 1;
}
Eu nгo cheguei a analisar o cуdigo, mas como citei, provavelmente o erro й de brackets nгo fechadas. Verifique todas as brackets do seu script e verifique se elas estгo corretamente fechadas. Existem algumas ferramentas por aн que podem lhe ajudar nisto.
|
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1450) : error 036: empty statement
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1488) : error 035: argument type mismatch (argument 1)
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1494) : error 004: function "split" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1612) : error 004: function "split" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1733) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1733 -- 1735) : warning 215: expression has no effect
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1735) : error 001: expected token: ";", but found "new"
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(4235) : error 004: function "OnPlayerLogin" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(4242) : error 004: function "OnPlayerLogin" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(4291) : error 004: function "OnPlayerRegister" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(4300) : error 004: function "OnPlayerRegister" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(4356) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(4392) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(4427) : error 004: function "ClearChatbox" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(4441) : error 004: function "ClearChatbox" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5086) : error 004: function "OnPlayerText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5092) : error 004: function "OnPlayerText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5103) : error 004: function "OnPlayerText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5109) : error 004: function "OnPlayerText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5118) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5122) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5136) : error 017: undefined symbol "NomeFamy"
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5179) : error 017: undefined symbol "NomeFamy"
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5186) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5194) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5198) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(5207) : error 004: function "OnPlayerCommandText" is not implemented
forward split(const strsrc[], strdest[][], delimiter);
pawn Код:
|
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1450) : error 036: empty statement
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1488) : error 035: argument type mismatch (argument 1)
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1494) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1494) : error 004: function "split" is not implemented
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1494) : error 029: invalid expression, assumed zero
C:\Users\Leonardo\Desktop\Facil\gamemodes\BPF.pwn(1494) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
public split(const strsrc[], strdest[][], delimiter)
{
new i, li;
new aNum;
new len;
while(i <= strlen(strsrc)){
if(strsrc[i]==delimiter || i==strlen(strsrc)){
len = strmid(strdest[aNum], strsrc, li, i, 128);
strdest[aNum][len] = 0;
li = i+1;
aNum++;
}
i++;
}
return 1;
}