SA-MP Forums Archive
[Ajuda] Ao colocar Sistema de helpers em GM - 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] Ao colocar Sistema de helpers em GM (/showthread.php?tid=348089)



[Ajuda] Ao colocar Sistema de helpers em GM - igor martins - 04.06.2012

Sгo 2 erros o 1 :
Код:
C:\Documents and Settings\Igor\Desktop\Brasil Play Street\gamemodes\BPS.pwn(962) : error 009: invalid array size (negative, zero or out of bounds)
Local do erro:
Код:
new AdmInfo[31][Admin];
new HelperInfo[21][Helper];
2 Erro:

Код:
C:\Documents and Settings\Igor\Desktop\Brasil Play Street\gamemodes\BPS.pwn(7741) : error 017: undefined symbol "helperhide"
Код:
C:\Documents and Settings\Igor\Desktop\Brasil Play Street\gamemodes\BPS.pwn(7741) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Igor\Desktop\Brasil Play Street\gamemodes\BPS.pwn(7741) : error 029: invalid expression, assumed zero
Local do erro:

Код:
admhide[playerid] = 0;
helperhide[playerid] = 0;
Se alguem puder me ajudar a arrumar os erros agradeзo.


Re: [Ajuda] Ao colocar Sistema de helpers em GM - blacktrindade - 04.06.2012

Код:
C:\Documents and Settings\Igor\Desktop\Brasil Play Street\gamemodes\BPS.pwn(962) : error 009: invalid array size (negative, zero or out of bounds)
voce ta declarando essa matriz multidimenssional errado!
pawn Код:
new AdmInfo[31][Admin];//Da o Valor de 0
new HelperInfo[21][Helper];//Da o Valor de 0
Em vez de [Admin] e [Helper] Use assim por exemplo:

pawn Код:
new HelperInfo[8][20] = {
"Aspira a Helper",
"Helper Iniciante",
"Helper Intermediбrio",
"Helper Avanзado",
"Helper Graduado",
"Helper Pos Graduado",
"Helper Senior",
"Helper Chefe",
};
Код:
C:\Documents and Settings\Igor\Desktop\Brasil Play Street\gamemodes\BPS.pwn(7741) : error 017: undefined symbol "helperhide"
Simbolo helperhide nao definido

Vai no topo do GM e adciona
pawn Код:
helperhide[MAX_PLAYERS];
Код:
C:\Documents and Settings\Igor\Desktop\Brasil Play Street\gamemodes\BPS.pwn(7741) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Igor\Desktop\Brasil Play Street\gamemodes\BPS.pwn(7741) : error 029: invalid expression, assumed zero
Posta a Linha, mais pelo primeiro erro diz que falta ";" na linha 7740


Re: [Ajuda] Ao colocar Sistema de helpers em GM - EditPawn - 04.06.2012

defina no topo do gm...
pawn Код:
new admhide[MAX_PLAYERS], helperhide[MAX_PLAYERS];

E o sistema de admin, poderia ser assim tambem \/
pawn Код:
enum PlayerInfo
{
    pAdmin,
    pHelper
}

new PlayerInfo[MAX_PLAYERS][PlayerInfo];
Espero ter ajudado
Modo de uso:
pawn Код:
PlayerInfo[playerid][pAdmin] = 5;