constant symbol has no size - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: constant symbol has no size (
/showthread.php?tid=273137)
constant symbol has no size -
jaksimaksi - 31.07.2011
pawn Код:
for(new h = 0; h < sizeof(HouseSystem); h++) // error 039: constant symbol has no size
{
if(HouseSystem[h][hOwned] == 0) //invalid subscript (not an array or too many subscripts): "HouseSystem" | rror 001: expected token: ";", but found "]"
{
if(HouseSystem[h][hSetted] == 1)
{
format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseSystem[h][hWorld], HouseSystem[h][hValue],HouseSystem[h][hDiscription], HouseSystem[h][hLevel]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,HouseSystem[h][hEntrancex], HouseSystem[h][hEntrancey], HouseSystem[h][hEntrancez],25, 0, 1);
}
}
else if(HouseSystem[h][hOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"House is Owned by %s \n House ID: %d \n Rent Price: $%d \n Description: %s \n To Rent Type /rentroom", HouseSystem[h][hOwner],HouseSystem[h][hWorld], HouseSystem[h][hRent], HouseSystem[h][hDiscription]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFAA,HouseSystem[h][hEntrancex], HouseSystem[h][hEntrancey], HouseSystem[h][hEntrancez],25, 0, 1);
}
}
Im trying to make a 3dtextlabels on houses, but get errors... whats wrong?
Re: constant symbol has no size -
MadeMan - 31.07.2011
Show the line that has:
AW: constant symbol has no size -
jaksimaksi - 31.07.2011
pawn Код:
enum HouseSystem
{
Description[128],
Owner[MAX_PLAYER_NAME],
Float:EnterX,
Float:EnterY,
Float:EnterZ,
EnterWorld,
EnterInterior,
Float:EnterAngle,
Float:ExitX,
Float:ExitY,
Float:ExitZ,
ExitInterior,
Float:ExitAngle,
Owned,
Rentable,
RentCost,
HousePrice,
Materials,
Drugs,
Money,
Locked,
PickupID,
};
new Houses[100][HouseSystem];
Re: constant symbol has no size -
MadeMan - 31.07.2011
Change HouseSystem to Houses:
pawn Код:
for(new h = 0; h < sizeof(Houses); h++)
{
if(Houses[h][hOwned] == 0)
{
if(Houses[h][hSetted] == 1)
{
format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",Houses[h][hWorld], Houses[h][hValue],Houses[h][hDiscription], Houses[h][hLevel]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,Houses[h][hEntrancex], Houses[h][hEntrancey], Houses[h][hEntrancez],25, 0, 1);
}
}
else if(Houses[h][hOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"House is Owned by %s \n House ID: %d \n Rent Price: $%d \n Description: %s \n To Rent Type /rentroom", Houses[h][hOwner],Houses[h][hWorld], Houses[h][hRent], Houses[h][hDiscription]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFAA,Houses[h][hEntrancex], Houses[h][hEntrancey], Houses[h][hEntrancez],25, 0, 1);
}
}
AW: constant symbol has no size -
jaksimaksi - 31.07.2011
OMG im sooo blind..... Thank you