Problematic tiny loop
#1

Hey guys! I've been trying to make a short loop of arrays value so I could just put the string in a function instead of making about three hundred useless lines, could anyone help me out? That's the thing:

Код:
public OnGameModeInit()
{
	for (new count=300, skin[300]; count!=0; count--) {
	skin[299--] = count; }
	// Don't use these lines if it's a filterscript
	SetGameModeText("0.001");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}
The error that I get every time I try to compile:
PHP код:
error 022must be lvalue (non-constant
Thanks in advance!
Reply
#2

pawn Код:
new Skin[300];
new Skins;

public OnGameModeInit()
{
    for(new skinid; skinid != sizeof(Skin); skinid++)
    {
        if(skinid != 74)
            Skin[Skins++] = skinid;
    }
    // Don't use these lines if it's a filterscript
    SetGameModeText("0.001");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)