error 018: initialization data exceeds declared size
#1

Hello there,

So I have this little problem:

Код:
D:\samp\gamemodes\gm.pwn(158) : warning 228: length of initialler exceeds size of the enum field
D:\samp\gamemodes\gm.pwn(158) : error 018: initialization data exceeds declared size
pawn Код:
enum _factionInfos{
    fName[24],
    fColor[6],
    Float:fHQX,
    Float:fHQY,
    Float:fHQZ,
    Float:fiHQX,
    Float:fiHQY,
    Float:fiHQZ,
    fiHQ,
    Float:fDutyX,
    Float:fDutyY,
    Float:fDutyZ
}

new FactionInfos[MAX_FACTIONS][_factionInfos] = {
    {"Mayor", "D1A700", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 9999.99, 9999.99, 9999.99}, //This is line 158
    {"Sheriff Departmen", "009900", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 0.0, 0.0, 0.0},
    {"Medic Center", "8C1717", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 0.0, 0.0, 0.0},
    {"Fort Carson News", "97694F", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 9999.99, 9999.99, 9999.99},
    {"Tagliano", "000000", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 9999.99, 9999.99, 9999.99}
};
Reply
#2

what is the defination of MAX_FACTIONS?
Reply
#3

it is 5
Reply
#4

fColor needs to be 7 cells long as it also has to hold a NULL character. I assume you're going to use these colors embedded, otherwise you should just input them as integers.
Reply
#5

Thanks, that helped, working now It must be string, cus system is working with strings
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)