[Ajuda] error 029: invalid expression, assumed zero - 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] error 029: invalid expression, assumed zero (
/showthread.php?tid=642882)
error 029: invalid expression, assumed zero -
binnyl - 08.10.2017
Eu fiz um sistema de inventario, mas quando fui compilar me daparei com esse erro:
error 029: invalid expression, assumed zero
Alguйm poderia me ajudar?
O erro ta na linha: new InvPlayer[MAX_PLAYERS][MAX_SLOTS][invinfos];
De:
Код:
// INV_1
#define MAX_SLOTS = 20;
enum invinfos
{
invID,
invMODEL,
invTYPE
}
new InvPlayer[MAX_PLAYERS][MAX_SLOTS][invinfos];
new backpack[MAX_PLAYERS];
new slotInvPlayerMexendo[MAX_PLAYERS];
Seria tipo:
InvPlayer[playerid][1][invMODEL] = 30;
Seria uma AK no slot 1 da BP
Re: error 029: invalid expression, assumed zero -
RodrigoMSR - 08.10.2017
PHP код:
#define MAX_SLOTS 20
Re: error 029: invalid expression, assumed zero -
binnyl - 08.10.2017
Quote:
Originally Posted by RodrigoMSR
PHP код:
#define MAX_SLOTS 20
|
Nossa, como eu sou idiota....
Obrigado, +rep
Pq ta dando problema:
error 029: invalid expression, assumed zero
Na funзгo que eu fiz pra falar o nome dos itens?
PHP код:
stock GetItemName(imodel, itype) {
if(imodel == 58) { // medicamentos
if(itype == 1) return "Painkiller";
else if(itype == 2) return "Morphine";
else if(itype == 3) return "Heat Pack";
else if(itype == 4) return "Bandage";
else if(itype == 5) return "Medkit";
else if(itype == 6) return "Blood Bag";
}
}
Re: error 029: invalid expression, assumed zero -
RodrigoMSR - 08.10.2017
PHP код:
stock GetItemName(imodel, itype) {
new str[20];
if(imodel == 58) { // medicamentos
if(itype == 1) str = "Painkiller";
else if(itype == 2) str = "Morphine";
else if(itype == 3) str = "Heat Pack";
else if(itype == 4) str = "Bandage";
else if(itype == 5) str = "Medkit";
else if(itype == 6) str = "Blood Bag";
}
return str;
}
Re: error 029: invalid expression, assumed zero -
binnyl - 09.10.2017
Obrigado!