error 052: multi-dimensional arrays must be fully initialized
#1

Код:
(110) : error 052: multi-dimensional arrays must be fully initialized
This is the script:

pawn Код:
new Float:FireLocations[MAX_FIRES][3]=
{
    {0.0,0.0,0.0},
    {0.0,0.0,0.0}
};//line 110
Thanks!
Reply
#2

new Float:FireLocations[MAX_FIRES][3]=
{
{0.0,0.0,0.0},
{0.0,0.0,0.0},
{0.0,0.0,0.0}
};//line 110

You say 3 and make just 2 . I think this is a problem.
Reply
#3

That doesn't do anything Azazelo. I knew that it wouldn't. Because it's only looking at 2, not 3.
Reply
#4

No, the 3 refers to the number of arguments in the third dimension (in this case: x, y, z). The problem is that MAX_FIRES is not defined 2, but something else. You can just leave the first dimension empty, though. The compiler can calculate the size itself.
pawn Код:
new Float:FireLocations[][3]=
{
    {0.0,0.0,0.0},
    {0.0,0.0,0.0}
};

// the following > might < work
#define MAX_FIRES sizeof(FireLocations)
Reply
#5

Thanks Vince, helped a lot.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)