Retriving my Memory Of Scripting. [Need help :)]
#4

There are two different array sizes in the array inside the array: the name is another array with a size of about 20 cells, but the three numbers only have one cell.
But you don't have to use a second variable, it's better to use an enum here, for example:
pawn Код:
enum Map
{
    mapName[32],
    mapNum1, // TODO: change variable names
    mapNum2,
    mapNum3
}

new MapNames[][Map]
{
    { "Name of map #1", 0, 0, 0 },
    { "Name of map #2", 1, 1, 1 }
};
And, array indices start with 0, so there is no index 4 here:
pawn Код:
SetPlayerPos(MapNames[DefaultMap][2],MapNames[DefaultMap][3],MapNames[DefaultMap][4]);
Reply


Messages In This Thread
Retriving my Memory Of Scripting. [Need help :)] - by DeadAhead - 25.04.2011, 19:15
Re: Retriving my Memory Of Scripting. [Need help :)] - by DeadAhead - 25.04.2011, 19:55
Re: Retriving my Memory Of Scripting. [Need help :)] - by DeadAhead - 25.04.2011, 20:20
AW: Retriving my Memory Of Scripting. [Need help :)] - by Fabsch - 25.04.2011, 21:04

Forum Jump:


Users browsing this thread: 1 Guest(s)