Sistema infoorg. -
Eae povo que curti programar um script, modifiquei um sistema de gerenciar organizaзхes mais tб dando um tando de erros que me irrita tб difнcil, alguйm sabe oque faзo?
Код:
enum InfoOrg
{
VagaID
}
new pInfoOrg[MAX_PLAYERS][InfoOrg];
forward CarregarInfoOrg(playerid);
forward SalvarInfoOrg(playerid);
public CarregarInfoOrg(playerid) // Public registrada anteriormente pela forward
{
if(PlayerInfo[playerid][pMembro] > 0 || PlayerInfo[playerid][pLider] > 0) // Caso vocк use outra variбvel, altere a aqui setada.
{
new caminho[56];//Nгo sou muito bom em contar caracteres para por a string de modo correto, entгo sempre deixo assim.
if(PlayerInfo[playerid][pLider] == 0) format(caminho, sizeof(caminho), "/InfoOrg/Org%d.ini", PlayerInfo[playerid][pMembro]); // Esse й o caminho do arquivo
if(PlayerInfo[playerid][pLider] > 0) format(caminho, sizeof(caminho), "InfoOrg/Org%d.ini", PlayerInfo[playerid][pLider]); // Esse й o caminho do arquivo caso o player seja lнder de alguma organizaзгo.
if(!dini_Exists(caminho)) dini_Create(caminho); // Essa linha checarб se o arquivo existe ou nгo, caso negativo, criarб o mesmo.
new player[MAX_PLAYER_NAME];//Essa variбvel serб usada para ver o nome do player.
GetPlayerName(playerid, player, sizeof(player));//Essa linha pegarб o nome do player e incluirб na variбvel
pInfoOrg[playerid][VagaID] = 0;
// AS LINHAS ABAIXO SГO AS VAGAS
if(dini_IntSet(caminho, "Vaga1") == player) return pInfoOrg[playerid][VagaID] = 1;
if(dini_IntSet(caminho, "Vaga2") == player) return pInfoOrg[playerid][VagaID] = 2;
if(dini_IntSet(caminho, "Vaga3") == player) return pInfoOrg[playerid][VagaID] = 3;
if(dini_IntSet(caminho, "Vaga4") == player) return pInfoOrg[playerid][VagaID] = 4;
if(dini_IntSet(caminho, "Vaga5") == player) return pInfoOrg[playerid][VagaID] = 5;
if(dini_IntSet(caminho, "Vaga6") == player) return pInfoOrg[playerid][VagaID] = 6;
if(dini_IntSet(caminho, "Vaga7") == player) return pInfoOrg[playerid][VagaID] = 7;
if(pInfoOrg[playerid][VagaID] == 0)
{
if(!PlayerInfo[playerid][pLider] == dini_IntSet(caminho, "Lider")) // Caso o nome do lнder contido no arquivo seja diferente do nome
{
PlayerInfo[playerid][pLider] = 0;
PlayerInfo[playerid][pMembro] = 0;
SetPlayerSkin(playerid, 23);
SpawnPlayer(playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "Vocк foi demitido de sua organizaзгo enquanto estava OffLine, sinto muito!");
}//Vocк poderб ver quais sгo as outras variбveis setadas no /pedircontas e acrescentar aqui.
}
}
}
public SalvarInfoOrg(playerid)//Public anteriormente definida pela forward
{
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]);
new player[MAX_PLAYER_NAME];
GetPlayerName(playerid, player, sizeof(player)));
if(!dini_Exists(caminho)) dini_Create(caminho);
new vagaid[16];
if(PlayerInfo[playerid][pLider] > 0) format(vagaid, sizeof(vagaid), "Vaga%d", PlayerInfo[playerid][pLider]); dini_IntSet(caminho, vagaid, player);
if(PlayerInfo[playerid][pLider] == 0) dini_IntSet(caminho, "Lider", player);
}
}
if(strcmp(cmd, "/infoorg", true) == 0)
{
if(PlayerInfo[playerid][pMembro] > 0 || PlayerInfo[playerid][pLider] > 0)
{
new caminho[56];
if(PlayerInfo[playerid][pLider] == 0) format(caminho, sizeof(caminho), "/InfoOrg/Org%d", PlayerInfo[playerid][pMembro]);
if(PlayerInfo[playerid][pLider] > 0) format(caminho, sizeof(caminho), "/InfoOrg/Org%d", PlayerInfo[playerid][pLider]);
new v1[16], v2[16], v3[16], v4[16], v5[16], v6[16], v7[16], l[16];
format(v1, sizeof(v1), "~~> Vaga 1: %s", dini_Get(caminho, "Vaga1");
format(v2, sizeof(v2), "~~> Vaga 2: %s", dini_Get(caminho, "Vaga2");
format(v3, sizeof(v3), "~~> Vaga 3: %s", dini_Get(caminho, "Vaga3");
format(v4, sizeof(v4), "~~> Vaga 4: %s", dini_Get(caminho, "Vaga4");
format(v5, sizeof(v5), "~~> Vaga 5: %s", dini_Get(caminho, "Vaga5");
format(v6, sizeof(v6), "~~> Vaga 6: %s", dini_Get(caminho, "Vaga6");
format(v7, sizeof(v7), "~~> Vaga 7: %s", dini_Get(caminho, "Vaga7");
format(l, sizeof(l), "~~> Lider da Organizaзгo: %s", dini_Get(caminho, "Lider");
SendClientMessage(playerid, 0xFFFFFFF, "Informaзхes da Organizaзгo");
SendClientMessage(playerid, 0xFFFFFFF, l);
SendClientMessage(playerid, 0xFFFFFFF, v1);
SendClientMessage(playerid, 0xFFFFFFF, v2);
SendClientMessage(playerid, 0xFFFFFFF, v3);
SendClientMessage(playerid, 0xFFFFFFF, v4);
SendClientMessage(playerid, 0xFFFFFFF, v5);
SendClientMessage(playerid, 0xFFFFFFF, v6);
SendClientMessage(playerid, 0xFFFFFFF, v7);
}
return 1;
}
Код:
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1647) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1647) : error 033: array must be indexed (variable "player")
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1648) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1648) : error 033: array must be indexed (variable "player")
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1649) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1649) : error 033: array must be indexed (variable "player")
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1650) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1650) : error 033: array must be indexed (variable "player")
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1651) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1651) : error 033: array must be indexed (variable "player")
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1652) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1652) : error 033: array must be indexed (variable "player")
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1653) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1653) : error 033: array must be indexed (variable "player")
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1656) : warning 202: number of arguments does not match definition
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1656) : warning 213: tag mismatch
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1666) : warning 209: function "CarregarInfoOrg" should return a value
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1674) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1676) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1676) : error 029: invalid expression, assumed zero
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1676) : warning 215: expression has no effect
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1679) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(1680) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(27030) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(27031) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(27032) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(27033) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(27034) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(27035) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(27036) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(27037) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(39424) : warning 203: symbol is never used: "MembroOrg2"
C:\Documents and Settings\P.Henrique\Desktop\samp03\gamemodes\BUL.pwn(39424) : warning 203: symbol is never used: "Orgs2"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
20 Errors.
Re: Sistema infoorg. -
ta faltando definir um monte de coisa amigo, o InfoORG com certeza nгo й feito apenas nestes 2 sistema que vocк postou, poste o sistema inteiro.
Re: Sistema infoorg. -
Re: Sistema infoorg. -