constant symbol has no size
#1

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?
Reply
#2

Show the line that has:

pawn Код:
new HouseSystem
Reply
#3

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];
Reply
#4

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);
        }
    }
Reply
#5

OMG im sooo blind..... Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)