Array 3D
#4

Encontre esta este mensaje buscando arrays... La cosa es que funciona perfecto con valores float pero no lo pude hacer funcionar con valores de tipo string.

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
I don't understand, why can't you use enums like that?

pawn Код:
#define MAX_MISSIONS (256)
#define CARGO_TYPES (5)
#define MAX_CHECKPOINTS_IN_DEST (2)
#define VEHICLE_SIZES (4)

enum e_MultiCheckpoint
{
    Float:Xpos[MAX_CHECKPOINTS_IN_DEST],
    Float:Ypos[MAX_CHECKPOINTS_IN_DEST],
    Float:Zpos[MAX_CHECKPOINTS_IN_DEST]
}

enum e_Mission
{
    bool:M_Enabled,
    DestUsed,
    Float:Destination[e_MultiCheckpoint],
    Name[64]
}

enum e_VehicleSizes
{
    Size_A[e_Mission],
    Size_B[e_Mission],
    Size_C[e_Mission],
    Size_D[e_Mission]
}

new Mission [MAX_MISSIONS] [CARGO_TYPES] [e_VehicleSizes];

public OnFilterScriptInit()
{
    Mission[0][0][Size_A][Destination][Xpos][0] = 4.5;
   
    printf("%f", Mission[0][0][Size_A][Destination][Xpos][0]);
   
    return true;
}
Sorry If I misread.
Reply


Messages In This Thread
Array 3D - by YazukiAkira - 12.08.2014, 04:28
Respuesta: Array 3D - by OTACON - 12.08.2014, 05:43
Respuesta: Array 3D - by [J]ulian - 12.08.2014, 06:02
Respuesta: Array 3D - by YazukiAkira - 12.08.2014, 06:16

Forum Jump:


Users browsing this thread: 1 Guest(s)