SA-MP Forums Archive
Help me out with warning 228 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me out with warning 228 (/showthread.php?tid=529953)



Help me out with warning 228 - Emre__ - 04.08.2014

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!


Re: Help me out with warning 228 - ViniBorn - 04.08.2014

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]);