4 Really annoying ERRORS.
#1

There are the errors :
PHP код:
(26131) : error 008must be a constant expressionassumed zero
(26131) : error 009invalid array size (negativezero or out of bounds)
(
26131) : error 036: empty statement
(26131) : fatal error 107too many error messages on one line 
Here's the script :
Код:
for(new h=0; h < MAX_HOUSES; h++)
            	     		{
           	     			new Text3D:hLabelID[h];
							hLabelID[h] = CreateDynamic3DTextLabel(labelString, ADMIN_GREEN, Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
                			new labelString[96];
							format(labelString, sizeof(labelString), "House %d\n Price: %d", NewHouseID, Houses[h][HousePrice])
							}
Line 26131 :
Код:
           	     			new Text3D:hLabelID[h];
I would appericate any help, thank you.
Reply
#2

new Text3D:hLabelID[h];

That piece of code makes no sense, what are you trying to do? It would appear that your intention is to have an array with all of the house label ID's stored in it. In that case, why are you creating it in a local scope? Create it in the global scope, for example:

pawn Код:
new Text3D:hLabelID[MAX_HOUSES];
To create it in a global scope, make sure it is not placed under a callback or function, preferably at the top of the script where there are most likely many other global variables.
Reply
#3

Ho! thank you, as I haven't seen your message, I managed to fix those errors another way.

But, I've got new one which is WAY-more difficult:
PHP код:
(26133) : error 033: array must be indexed (variable "Houses"
A warning comes along with it :
PHP код:
(26133) : warning 213tag mismatch 
Here's the bugged line :
Код:
        Houses[hLabelID] = CreateDynamic3DTextLabel(labelString, ADMIN_GREEN, Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1);
Reply
#4

pawn Код:
for(new h=0; h < MAX_HOUSES; h++)
{
    hLabelID[h] = CreateDynamic3DTextLabel(labelString, ADMIN_GREEN, Houses[h][hExteriorX],Houses[h][hExteriorY],Houses[h][hExteriorZ],30.0,0,1);
}
The other error is pretty much saying that you are not creating the house variable correctly. It should be like this
pawn Код:
new Houses[MAX_HOUSES][ENUM_VARIABLE]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)