Help me out with warning 228
#1

pawn Код:
enum tdmCameraPos
{
    Float: tCamX,
    Float: tCamY,
    Float: tCamZ,
    Float: tLookX,
    Float: tLookY,
    Float: tLookZ,
}

new TDMs_Camera_Info[][][tdmCameraPos] =
{
    {// TDM Order
        {// Team Order
            {3864.5346, -2012.9477, 36.7410, 3858.5166, -2004.9614, 32.6736}, // Red Team (line 788)
            {3864.5346, -2012.9477, 36.7410, 3858.5166, -2004.9614, 32.6736}  // Blue Team
        }
    }
};
I'm getting this error when I'm doing:

pawn Код:
printf("%f", TDMs_Camera_Info[0][0][tCamX]);
// (788) : warning 228: length of initialler exceeds size of the enum field
Help me with this!
Reply
#2

Try this
pawn Код:
enum tdmCameraPos
{
    Float: tCamX,
    Float: tCamY,
    Float: tCamZ,
    Float: tLookX,
    Float: tLookY,
    Float: tLookZ,
}

new TDMs_Camera_Info[2][tdmCameraPos] = {
{3864.5346, -2012.9477, 36.7410, 3858.5166, -2004.9614, 32.6736},
{3864.5346, -2012.9477, 36.7410, 3858.5166, -2004.9614, 32.6736}
};

printf("%f", TDMs_Camera_Info[0][tCamX]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)