About arrays
#1

Hello everyone , i'm trying to make pickups storing them in a array

Example :

pawn Код:
new variable[10];

public OnGameModeInit()
{
    variable[0] = CreatePickup(0,1,0,0,0,-1);
    return 1;
}
I'm adding to each one a function using the statement switch but as far i know i can't use arrays in switch.. is there another way to do this?

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    switch(variable[])
    {
        case 0:
        {
            //
        }
        case 1:
        {
            //
        }
        case 2:
        {
            //
        }
    }
    return 1;
}
Thanks!.
Reply


Messages In This Thread
About arrays - by xeon_inside - 30.12.2014, 17:39
Re: About arrays - by PowerPC603 - 30.12.2014, 18:12
Respuesta: About arrays - by xeon_inside - 30.12.2014, 18:24

Forum Jump:


Users browsing this thread: 1 Guest(s)