Array causes compiler to crash -
Jacksta21 - 22.07.2014
Hey guys..
I have this random skin array. and whenever I uncomment it, it forces my compiler to crash when i compile.
I can't see the error here, maybe a second opinion will help
pawn Код:
new RandomSkin[43][1] = {
{1},{2},{3},{4},{5},{6},{7},{17},{18},{19},{20},{21},{22},{23},{24},{25},{29},
{44},{45},{47},{51},{52},{66},{67},{82},{83},{84},{102},{103},{104},{105},
{106},{107},{108},{109},{110},{114},{115},{116},{121},{122},{154},{186} //43
};
Re: Array causes compiler to crash -
SilentSoul - 22.07.2014
You don't need to create an array for random skin you can simply use:
pawn Код:
SetPlayerSkin(playerid,random(186)+1); // it will return with a random number from 1 - 186
Re: Array causes compiler to crash -
Jacksta21 - 22.07.2014
I don't want certain skins, hence I came up with this...
Do you see anything wrong with the array?
Re: Array causes compiler to crash -
driftpower - 22.07.2014
Quote:
Originally Posted by SilentSoul
You don't need to create an array for random skin you can simply use:
pawn Код:
SetPlayerSkin(playerid,random(186)+1); // it will return with a random number from 1 - 186
|
there is 299 skins btw.
Re: Array causes compiler to crash -
Jacksta21 - 22.07.2014
Can someone actually read my question please? :/
Re: Array causes compiler to crash -
DarkPower - 22.07.2014
Just use normal array
new RandomSkin[43] = {
1,2,3...
};
Re: Array causes compiler to crash -
Jacksta21 - 22.07.2014
even with
pawn Код:
new RandomSkin[43] = {
1,2,3,
4,5,6,
7,17,18,
19,20,21,
22,23,24,
25,29,44,
45,47,51,
52,66,67,
82,83,84,
102,103,104,
105,106,107,
108,109,110,
114,115,116,
121,122,154,
186 //43
};
Compiler still crashes
If I comment it out it compiles fine..
Re: Array causes compiler to crash -
Mauzen - 22.07.2014
Could be a define that involves RandomSkin in some kind. Looping defines are a great way to crash the compiler with apart from that correct code.
Thats the best guess I can make without deeper knowledge of the code.
Re: Array causes compiler to crash -
Jacksta21 - 22.07.2014
Quote:
Originally Posted by ******
That array by itself is not the problem. There must be something in where it is located or being used.
|
Ah..
That solved the issue, thanks!
The issue lied where it was being used, so I changed and use it now in a more sensible place, thanks again.