Array causes compiler to crash
#1

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
};
Reply
#2

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
Reply
#3

I don't want certain skins, hence I came up with this...
Do you see anything wrong with the array?
Reply
#4

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.
Reply
#5

Can someone actually read my question please? :/
Reply
#6

Just use normal array

new RandomSkin[43] = {
1,2,3...
};
Reply
#7

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..
Reply
#8

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.
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)