[Ajuda] 1 Erro (initialization data exceeds declared size) - 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] 1 Erro (initialization data exceeds declared size) (
/showthread.php?tid=519496)
1 Erro (initialization data exceeds declared size) -
LE4NDrO - 14.06.2014
Erro :
pawn Код:
C:\Users\Leandro\Desktop\TUT.pwn(8) : error 018: initialization data exceeds declared size
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Comando completo :
pawn Код:
new Float:GalsTeleport[3][3] =
{
{1911.9089,-2296.0752,13.5469,263.6957}, // erro
{1908.9016,-2327.6499,13.5469,263.6957},
{1909.1213,-2350.7175,13.5469,263.6957}
};
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/tele", cmdtext, true, 10) == 0)
{
new rand = random(sizeof(GalsTeleport));
SetPlayerPos(playerid,GalsTeleport[rand][0],GalsTeleport[rand][1],GalsTeleport[rand][2]);
}
return 1;
}
Re: 1 Erro -
focaximubh - 14.06.2014
pawn Код:
new Float:GalsTeleport[][3] =
{
{1911.9089,-2296.0752,13.5469}, // erro ===== Vocк tem 4 valores declarando [3]
{1908.9016,-2327.6499,13.5469},
{1909.1213,-2350.7175,13.5469}
};
//pronto deve resolver :D
Re: 1 Erro -
Krisky_ - 14.06.2014
essa linha
pawn Код:
new Float:GalsTeleport[3][3] =
deixe assim so teste
pawn Код:
new Float:GalsTeleport[][3] =
##EDIT nao vi que o cara respondeu antes!
Re: 1 Erro -
LE4NDrO - 14.06.2014
Vlw !
Re: 1 Erro -
focaximubh - 14.06.2014
disponha
sу para lembrar....
pawn Код:
error 018: initialization data exceeds declared size
Ocorre quando vocк estб declarando um tamanho para a sua condiзгo e ela excede esse tamanho ou fica menor que ele ex:
pawn Код:
new Float:GalsTeleport[][3] =
{1911.9089,-2296.0752,13.5469,263.6957}
1 2 3 4
//que й = ah error 018: initialization data exceeds declared size
//removendo o ъltimo valor:
{1911.9089,-2296.0752,13.5469}
// O erro irб sumir agora observe....
{1911.9089,-2296.0752,13.5469,263.6957}
X Y Z RX
//para setar a posiзгo й necessбrio X Y Z pois no SetPlayerPos utiliza-se:
SetPlayerPos(playerid, X, Y, Z);
espero que seja ъtil