2 unknown errors (Rep+)
#1

Hello, I got these unknown errors, I was attempting to convert my 0.3C GM to 0.3D until I got this error:

Код:
C:\Users\Admin\Desktop\san-rp\gamemodes\san-rp.pwn(1648) : error 018: initialization data exceeds declared size
C:\Users\Admin\Desktop\san-rp\gamemodes\san-rp.pwn(1663) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
I don't understand what it means.

pawn Код:
new PedSkins[176][1] = {
{299}, //default skin
{3},
{4},
{5},
{6},
{7},
{8},
{10},
{42},
{65},
{86},
{119},
{149},
{208},
{273},
{289},
{101},
{12},
{13},
{14},
{15}, //10
{151},
{156},
{168},
{170},
{182},
{54},
{183},
{184},
{75}, //20
{19},
{216},
{20},
{206},
{210},
{214},
{215}, //30
{221},
{225},
{226},
{223},
{231},
{228},
{234},
{76}, //40
{235},
{236},
{89},
{88},
{218},
{240},
{250},
{261}, //50
{40},
{41},
{35},
{37},
{38},
{36},
{44},
{43}, //60
{46},
{9},
{93},
{39},
{48},
{47},
{262},
{229},
{58},
{59}, //70
{60},
{232},
{233},
{67},
{7},
{72},
{55},
{94},
{95},
{98}, //80
{56},
{128},
{129},
{130},
{131},
{132},
{133},
{157},
{158},
{159}, //90
{160},
{196},
{197},
{198},
{199},
{161},
{162},
{200},
{201},
{202}, //100
{31},
{32},
{33},
{34},
{138},
{139},
{140},
{145},
{146},
{154}, //110
{251},
{92},
{97},
{45},
{18},
{258},
{259},
{26},
{51},
{52}, //120
{80},
{81},
{23},
{96},
{99},
{11},
{148},
{153}, //130
{167},
{68},
{171},
{172},
{179},
{189},
{155},
{205},
{209},
{217},
{211},
{219},
{260},
{16},
{27},
{264}, //150
{70},
{152},
{178},
{237},
{238},
{243},
{244},
{207},
{245},
{246}, //160
{85},
{256},
{257},
{64},
{63},
{87},
{90},
{191}, //170
{192},
{193},
{194},
{134},
{135},
{137},
{181},
{213},
{212},
{230}, //180
{239},
{249},
{241},
{242},
{29},
{49},
{50},
{57}, //190
{62},
{66},
{73},
{77},
{78},
{79},
{82},
{83},
{84}
};
Reply
#2

In 0.3d they added some new skins. Have you increased your array size to accommodate them?
Reply
#3

I dont know?
Reply
#4

The error simply means:

new Array[5] = {1,2,3,4,5,6}

Notice the array size above is not large enough to store all information you've given it.
You will need to adjust the array declared size to fit all of the information you have given it to store.

Why have you used PedSkins[171][1]?
Why not just declare it as PedSkins[171]? That should fix it
Reply
#5

Since this was relevent to my interests, I saved you some lines and fixed your error (as Rob told you how above):

pawn Код:
new PedSkins[176] = {
    {299}{3},
    {4},    {5},
    {6},    {7},
    {8},    {10},
    {42},   {65},
    {86},   {119},
    {149}{208},
    {273}{289},
    {101}{12},
    {13},   {14},
    {15},   {151},
    {156}{168},
    {170}{182},
    {54},   {183},
    {184}{75},
    {19},   {216},
    {20},   {206},
    {210}{214},
    {215},  {221},
    {225}{226},
    {223}{231},
    {228}{234},
    {76},   {235},
    {236}{89},
    {88},   {218},
    {240}{250},
    {261}{40},
    {41},   {35},
    {37},   {38},
    {36},   {44},
    {43},   {46},
    {9},    {93},
    {39},   {48},
    {47},   {262},
    {229}{58},
    {59},   {60},
    {232}{233},
    {67},   {7},
    {72},   {55},
    {94},   {95},
    {98},   {56},
    {128}{129},
    {130}{131},
    {132}{133},
    {157}{158},
    {159}{160},
    {196}{197},
    {198}{199},
    {161}{162},
    {200}{201},
    {202}{31},
    {32},   {33},
    {34},   {138},
    {139}{140},
    {145}{146},
    {154}{251},
    {92},   {97},
    {45},   {18},
    {258}{259},
    {26},   {51},
    {52},   {80},
    {81},   {23},
    {96},   {99},
    {11},   {148},
    {153}{167},
    {68},   {171},
    {172}{179},
    {189}{155},
    {205}{209},
    {217}{211},
    {219}{260},
    {16},   {27},
    {264},  {70},
    {152}{178},
    {237}{238},
    {243}{244},
    {207}{245},
    {246},  {85},
    {256}{257},
    {64},   {63},
    {87},   {90},
    {192}{193},
    {194}{134},
    {135}{137},
    {181}{213},
    {212}{230},
    {239}{249},
    {241}{242},
    {29},   {49},
    {50},   {57},
    {62},   {66},
    {73},   {77},
    {78},   {79},
    {82},   {83},
    {84}
};
Reply
#6

pawn Код:
PedSkins[][]
//or
PedSkins[190][1]
Should work. Also @Rob_Maate he must have 1 in second array coz Skin is one integrer size; Also he must have number of skins added. Can't explain it well xD
Reply
#7

Well that Solved that error, But now I got an error here

Код:
C:\Users\Admin\Desktop\san-rp\gamemodes\san-rp.pwn(15633) : error 001: expected token: ",", but found "["
C:\Users\Admin\Desktop\san-rp\gamemodes\san-rp.pwn(15633) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\san-rp\gamemodes\san-rp.pwn(15633) : warning 215: expression has no effect
C:\Users\Admin\Desktop\san-rp\gamemodes\san-rp.pwn(15633) : error 001: expected token: ";", but found "]"
C:\Users\Admin\Desktop\san-rp\gamemodes\san-rp.pwn(15633) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
pawn Код:
// Player Class's
    for(new i = 0; i <= sizeof(PedSkins)-1; i++)
    {
        AddPlayerClass(PedSkins[i][0],982.1890,-1624.2583,14.952,90,-1,-1,-1,-1,-1,-1);
    }
Reply
#8

pawn Код:
// Player Class's
    for(new i = 0; i <= sizeof(PedSkins)-1; i++)
    {
        AddPlayerClass(PedSkins[i],982.1890,-1624.2583,14.952,90,-1,-1,-1,-1,-1,-1);
    }
Reply
#9

Another error.

Код:
C:\Users\Admin\Desktop\san-rp\gamemodes\san-rp.pwn(1473) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
new PedSkins[176] = {
    {299},  {3},//Line 1473 is here
    {4},    {5},
    {6},    {7},
    {8},    {10},
    {42},   {65},
    {86},   {119},
    {149},  {208},
    {273},  {289},
    {101},  {12},
    {13},   {14},
    {15},   {151},
    {156},  {168},
    {170},  {182},
    {54},   {183},
    {184},  {75},
    {19},   {216},
    {20},   {206},
    {210},  {214},
    {215},  {221},
    {225},  {226},
    {223},  {231},
    {228},  {234},
    {76},   {235},
    {236},  {89},
    {88},   {218},
    {240},  {250},
    {261},  {40},
    {41},   {35},
    {37},   {38},
    {36},   {44},
    {43},   {46},
    {9},    {93},
    {39},   {48},
    {47},   {262},
    {229},  {58},
    {59},   {60},
    {232},  {233},
    {67},   {7},
    {72},   {55},
    {94},   {95},
    {98},   {56},
    {128},  {129},
    {130},  {131},
    {132},  {133},
    {157},  {158},
    {159},  {160},
    {196},  {197},
    {198},  {199},
    {161},  {162},
    {200},  {201},
    {202},  {31},
    {32},   {33},
    {34},   {138},
    {139},  {140},
    {145},  {146},
    {154},  {251},
    {92},   {97},
    {45},   {18},
    {258},  {259},
    {26},   {51},
    {52},   {80},
    {81},   {23},
    {96},   {99},
    {11},   {148},
    {153},  {167},
    {68},   {171},
    {172},  {179},
    {189},  {155},
    {205},  {209},
    {217},  {211},
    {219},  {260},
    {16},   {27},
    {264},  {70},
    {152},  {178},
    {237},  {238},
    {243},  {244},
    {207},  {245},
    {246},  {85},
    {256},  {257},
    {64},   {63},
    {87},   {90},
    {192},  {193},
    {194},  {134},
    {135},  {137},
    {181},  {213},
    {212},  {230},
    {239},  {249},
    {241},  {242},
    {29},   {49},
    {50},   {57},
    {62},   {66},
    {73},   {77},
    {78},   {79},
    {82},   {83},
    {84}
};
Reply
#10

Add "," after "{84}"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)