SA-MP Forums Archive
[Ajuda] Salvamento Infoorg - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Salvamento Infoorg (/showthread.php?tid=357053)



Salvamento Infoorg - Don_Speed - 05.07.2012

bom estou usando como base
http://forum.sa-mp.com/showpost.php?...17&postcount=7

Erros
pawn Код:
C:\Documents and Settings\don\Desktop\Teste.pwn(215) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(216) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(217) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(218) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(219) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(220) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(221) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(222) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(223) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(224) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(225) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(226) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(227) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(228) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(229) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(230) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(231) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(232) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(233) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(234) : error 033: array must be indexed (variable "dini_Get")
C:\Documents and Settings\don\Desktop\Teste.pwn(237) : error 033: array must be indexed (variable "dini_Get")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


21 Errors.
Linhas
pawn Код:
if(strcmp(dini_Get(caminho, "Vaga1") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 1;
          if(strcmp(dini_Get(caminho, "Vaga2") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 2;
          if(strcmp(dini_Get(caminho, "Vaga3") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 3;
          if(strcmp(dini_Get(caminho, "Vaga4") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 4;
          if(strcmp(dini_Get(caminho, "Vaga5") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 5;
          if(strcmp(dini_Get(caminho, "Vaga6") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 6;
          if(strcmp(dini_Get(caminho, "Vaga7") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 7;
          if(strcmp(dini_Get(caminho, "Vaga8") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 8;
          if(strcmp(dini_Get(caminho, "Vaga9") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 9;
          if(strcmp(dini_Get(caminho, "Vaga10") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 10;
          if(strcmp(dini_Get(caminho, "Vaga11") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 11;
          if(strcmp(dini_Get(caminho, "Vaga12") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 12;
          if(strcmp(dini_Get(caminho, "Vaga13") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 13;
          if(strcmp(dini_Get(caminho, "Vaga14") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 14;
          if(strcmp(dini_Get(caminho, "Vaga15") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 15;
          if(strcmp(dini_Get(caminho, "Vaga16") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 16;
          if(strcmp(dini_Get(caminho, "Vaga17") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 17;
          if(strcmp(dini_Get(caminho, "Vaga18") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 18;
          if(strcmp(dini_Get(caminho, "Vaga19") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 19;
          if(strcmp(dini_Get(caminho, "Vaga20") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 20;
Callback
pawn Код:
public CarregarInfoOrg(playerid)
{
     if(PlayerInfo[playerid][pMembro] > 0 || PlayerInfo[playerid][pLider] > 0)
     {
          new caminho[56];
          if(PlayerInfo[playerid][pLider] == 0) format(caminho, sizeof(caminho), "InfoOrg/Org%d.ini", PlayerInfo[playerid][pMembro]);
          if(PlayerInfo[playerid][pLider] >= 0) format(caminho, sizeof(caminho), "InfoOrg/Org%d.ini", PlayerInfo[playerid][pLider]);
          if(!dini_Exists(caminho)) dini_Create(caminho);
          new nomedoplayer[MAX_PLAYER_NAME];
          GetPlayerName(playerid, nomedoplayer, sizeof(nomedoplayer));
          pInfoOrg[playerid][VagaID] = 0;
          if(strcmp(dini_Get(caminho, "Vaga1") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 1;
          if(strcmp(dini_Get(caminho, "Vaga2") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 2;
          if(strcmp(dini_Get(caminho, "Vaga3") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 3;
          if(strcmp(dini_Get(caminho, "Vaga4") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 4;
          if(strcmp(dini_Get(caminho, "Vaga5") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 5;
          if(strcmp(dini_Get(caminho, "Vaga6") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 6;
          if(strcmp(dini_Get(caminho, "Vaga7") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 7;
          if(strcmp(dini_Get(caminho, "Vaga8") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 8;
          if(strcmp(dini_Get(caminho, "Vaga9") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 9;
          if(strcmp(dini_Get(caminho, "Vaga10") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 10;
          if(strcmp(dini_Get(caminho, "Vaga11") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 11;
          if(strcmp(dini_Get(caminho, "Vaga12") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 12;
          if(strcmp(dini_Get(caminho, "Vaga13") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 13;
          if(strcmp(dini_Get(caminho, "Vaga14") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 14;
          if(strcmp(dini_Get(caminho, "Vaga15") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 15;
          if(strcmp(dini_Get(caminho, "Vaga16") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 16;
          if(strcmp(dini_Get(caminho, "Vaga17") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 17;
          if(strcmp(dini_Get(caminho, "Vaga18") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 18;
          if(strcmp(dini_Get(caminho, "Vaga19") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 19;
          if(strcmp(dini_Get(caminho, "Vaga20") == nomedoplayer)) return pInfoOrg[playerid][VagaID] = 20;
          if(pInfoOrg[playerid][VagaID] == 0)
          {
               if(!PlayerInfo[playerid][pLider] == dini_Get(caminho, "Lider"))
               {
                    PlayerInfo[playerid][pLider] = 0;
                    PlayerInfo[playerid][pMembro] = 0;
               }
          }
     }
     return true;
}
isso ta me quebrando a cabeзa !
desde ja obrigado.


Re: Salvamento Infoorg - ViniBorn - 06.07.2012

pawn Код:
if(strcmp(dini_Get(caminho, "Vaga2") == nomedoplayer))
pawn Код:
if(!strcmp(dini_Get(caminho, "Vaga2"), nomedoplayer))
Faзa o mesmo com os outros


Re: Salvamento Infoorg - Don_Speed - 06.07.2012

Erro dini_Get continua


Re: Salvamento Infoorg - dPlaYer_ - 06.07.2012

#pergunta noob

vocк defininiu no topo nй? '-'

#include dini


Re: Salvamento Infoorg - Don_Speed - 06.07.2012

Quote:
Originally Posted by dPlaYer_
Посмотреть сообщение
#pergunta noob

vocк defininiu no topo nй? '-'

#include dini
Sim , sobre sistema de infoorg eu to noob kkk


Re: Salvamento Infoorg - paulor - 06.07.2012

pawn Код:
public CarregarInfoOrg(playerid)
{
     if(PlayerInfo[playerid][pMembro] > 0 || PlayerInfo[playerid][pLider] > 0)
     {
          new caminho[56];
          if(PlayerInfo[playerid][pLider] == 0) format(caminho, sizeof(caminho), "InfoOrg/Org%d.ini", PlayerInfo[playerid][pMembro]);
          if(PlayerInfo[playerid][pLider] >= 0) format(caminho, sizeof(caminho), "InfoOrg/Org%d.ini", PlayerInfo[playerid][pLider]);
          if(!dini_Exists(caminho)) dini_Create(caminho);
          new nomedoplayer[MAX_PLAYER_NAME];
          GetPlayerName(playerid, nomedoplayer, sizeof(nomedoplayer));
          pInfoOrg[playerid][VagaID] = 0;
          if(!strcmp(dini_Get(caminho, "Vaga1"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 1;
          else if(!strcmp(dini_Get(caminho, "Vaga2"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 2;
          else if(!strcmp(dini_Get(caminho, "Vaga3"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 3;
          else if(!strcmp(dini_Get(caminho, "Vaga4"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 4;
          else if(!strcmp(dini_Get(caminho, "Vaga5"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 5;
          else if(!strcmp(dini_Get(caminho, "Vaga6"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 6;
          else if(!strcmp(dini_Get(caminho, "Vaga7"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 7;
          else if(!strcmp(dini_Get(caminho, "Vaga8"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 8;
          else if(!strcmp(dini_Get(caminho, "Vaga9"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 9;
          else if(!strcmp(dini_Get(caminho, "Vaga10"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 10;
          else if(!strcmp(dini_Get(caminho, "Vaga11"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 11;
          else if(!strcmp(dini_Get(caminho, "Vaga12"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 12;
          else if(!strcmp(dini_Get(caminho, "Vaga13"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 13;
          else if(!strcmp(dini_Get(caminho, "Vaga14"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 14;
          else if(!strcmp(dini_Get(caminho, "Vaga15"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 15;
          else if(!strcmp(dini_Get(caminho, "Vaga16"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 16;
          else if(!strcmp(dini_Get(caminho, "Vaga17"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 17;
          else if(!strcmp(dini_Get(caminho, "Vaga18"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 18;
          else if(!strcmp(dini_Get(caminho, "Vaga19"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 19;
          else if(!strcmp(dini_Get(caminho, "Vaga20"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 20;
          else if(pInfoOrg[playerid][VagaID] == 0)
          {
               if(!PlayerInfo[playerid][pLider] == dini_Get(caminho, "Lider"))
               {
                    PlayerInfo[playerid][pLider] = 0;
                    PlayerInfo[playerid][pMembro] = 0;
               }
          }
     }
     return true;
}



Re: Salvamento Infoorg - Don_Speed - 06.07.2012

Quote:
Originally Posted by paulor
Посмотреть сообщение
pawn Код:
public CarregarInfoOrg(playerid)
{
     if(PlayerInfo[playerid][pMembro] > 0 || PlayerInfo[playerid][pLider] > 0)
     {
          new caminho[56];
          if(PlayerInfo[playerid][pLider] == 0) format(caminho, sizeof(caminho), "InfoOrg/Org%d.ini", PlayerInfo[playerid][pMembro]);
          if(PlayerInfo[playerid][pLider] >= 0) format(caminho, sizeof(caminho), "InfoOrg/Org%d.ini", PlayerInfo[playerid][pLider]);
          if(!dini_Exists(caminho)) dini_Create(caminho);
          new nomedoplayer[MAX_PLAYER_NAME];
          GetPlayerName(playerid, nomedoplayer, sizeof(nomedoplayer));
          pInfoOrg[playerid][VagaID] = 0;
          if(!strcmp(dini_Get(caminho, "Vaga1"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 1;
          else if(!strcmp(dini_Get(caminho, "Vaga2"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 2;
          else if(!strcmp(dini_Get(caminho, "Vaga3"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 3;
          else if(!strcmp(dini_Get(caminho, "Vaga4"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 4;
          else if(!strcmp(dini_Get(caminho, "Vaga5"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 5;
          else if(!strcmp(dini_Get(caminho, "Vaga6"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 6;
          else if(!strcmp(dini_Get(caminho, "Vaga7"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 7;
          else if(!strcmp(dini_Get(caminho, "Vaga8"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 8;
          else if(!strcmp(dini_Get(caminho, "Vaga9"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 9;
          else if(!strcmp(dini_Get(caminho, "Vaga10"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 10;
          else if(!strcmp(dini_Get(caminho, "Vaga11"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 11;
          else if(!strcmp(dini_Get(caminho, "Vaga12"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 12;
          else if(!strcmp(dini_Get(caminho, "Vaga13"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 13;
          else if(!strcmp(dini_Get(caminho, "Vaga14"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 14;
          else if(!strcmp(dini_Get(caminho, "Vaga15"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 15;
          else if(!strcmp(dini_Get(caminho, "Vaga16"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 16;
          else if(!strcmp(dini_Get(caminho, "Vaga17"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 17;
          else if(!strcmp(dini_Get(caminho, "Vaga18"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 18;
          else if(!strcmp(dini_Get(caminho, "Vaga19"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 19;
          else if(!strcmp(dini_Get(caminho, "Vaga20"), nomedoplayer)) return pInfoOrg[playerid][VagaID] = 20;
          else if(pInfoOrg[playerid][VagaID] == 0)
          {
               if(!PlayerInfo[playerid][pLider] == dini_Get(caminho, "Lider"))
               {
                    PlayerInfo[playerid][pLider] = 0;
                    PlayerInfo[playerid][pMembro] = 0;
               }
          }
     }
     return true;
}
Nao deu!!!


O erro esta aqui
pawn Код:
if(!PlayerInfo[playerid][pLider] == dini_Get(caminho, "Lider"))



Re: Salvamento Infoorg - paulor - 06.07.2012

pawn Код:
if(!PlayerInfo[playerid][pLider] == dini_Int(caminho, "Lider"))



Re: Salvamento Infoorg - CidadeNovaRP - 06.07.2012

pawn Код:
if(!PlayerInfo[playerid][pLider] == dini_Int(caminho, "Lider"))
^^

Й assim nega:

pawn Код:
if(PlayerInfo[playerid][pLider] != dini_Int(caminho, "Lider"))
Saiba mais:
https://sampforum.blast.hk/showthread.php?tid=240266

^^