4 Really ANNOYING ERRORS.
#1

There are the errors :
PHP код:
(1313) : error 008must be a constant expressionassumed zero
(1313) : error 029invalid expressionassumed zero
(1313) : error 017undefined symbol "LabelN"
(1313) : fatal error 107too many error messages on one line 
Here's the bugged line :
pawn Код:
new Text3D:LabelS[NewHouseID], Text3D:LabelN[NewHouseID];
Everything connected to the line... :
pawn Код:
stock Create3DHouse()
{
        for(new NewHouseID; NewHouseID<sizeof(Houses); NewHouseID++)
        {
        if(!Houses[NewHouseID][hExteriorY]) continue;
        new string[ 96 ],HouseForSale, HouseNotForSale, WasFSell, WasntFSell;
        new Text3D:LabelS[NewHouseID], Text3D:LabelN[NewHouseID];
        if(strcmp(Houses[NewHouseID][hOwner], "Nobody", true) == 0)
        {
            format(string, sizeof(string), "[House] %d\n buy price: %d (/buyhouse)", NewHouseID, Houses[NewHouseID][HousePrice]);
        }
        else
        {
            format(string, sizeof(string), "[House]\n %d", NewHouseID);
            HouseNotForSale = 1;
            WasntFSell = 1;
        }
        if(HouseForSale == 1)
        {
            WasFSell = 1;
            if(WasntFSell == 1)
            {
            Delete3DTextLabel(LabelN);
            WasntFSell = 0;
            }
            HouseNotForSale = 0;
            LabelS[NewHouseID] = Create3DTextLabel(string,HOUSE_YSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
        }
        else if(HouseNotForSale == 1)
        {
            HouseNotForSale = 1;
            WasntFSell = 1;
            if(WasFSell == 1)
            {
                Delete3DTextLabel(LabelS);
                WasFSell = 0;
            }
            LabelN[NewHouseID] = Create3DTextLabel(string,HOUSE_NSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
            HouseForSale = 0;
        }
        }
        return 1;
}
Reply
#2

pawn Код:
new Text3D:LabelS[MAX_HOUSES], Text3D:LabelN[MAX_HOUSES];
Reply
#3

If I will set it into max houses, I wont be able to add more houses, right?

By the way, it gives me those errors :
PHP код:
(1330) : error 032: array index out of bounds (variable "LabelN")
(
1334) : error 032: array index out of bounds (variable "LabelS")
(
1342) : error 032: array index out of bounds (variable "LabelS")
(
1345) : error 032: array index out of bounds (variable "LabelN"
Reply
#4

Yes, you will be able to add more.
Try this:
new Text3D:LabelS[500], Text3D:LabelN[500];
Reply
#5

You should consider using Incognito's streamer plug-in for those 3D Text labels.
Reply
#6

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
Yes, you will be able to add more.
Try this:
new Text3D:LabelS[500], Text3D:LabelN[500];
It still gives me errors :
PHP код:
(1330)  error 035argument type mismatch (argument 1)
(
1334)  error 033: array must be indexed (variable "LabelS")
(
1342)  error 035argument type mismatch (argument 1)
(
1345)  error 032: array index out of bounds (variable "LabelN"
There are bugged lines :
Line 1330 -
pawn Код:
Delete3DTextLabel(LabelN);
Line 1334 -
pawn Код:
LabelS = Create3DTextLabel(string,HOUSE_YSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
Line 1342 -
pawn Код:
Delete3DTextLabel(LabelS);
Line 1345 -
pawn Код:
LabelN = Create3DTextLabel(string,HOUSE_NSELL,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
Quote:
Originally Posted by Famalamalam
Посмотреть сообщение
You should consider using Incognito's streamer plug-in for those 3D Text labels.
Can you please explain more detailed?
Reply
#7

pawn Код:
Delete3DTextLabel(LabelN[NewHouseID]);
You can do the rest.
Reply
#8

Great, thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)