local or global variable in a timer/Using enum as integer
#2

Globals gets saved in the data section, locals in the stack
Creating normal local variables is only one opcode, also the speed should be the same as they are both loaded into the memory

For enums you need to define the tags for each "enum variable/constant" separately not for the array
pawn Code:
enum
{
    PlayerText: BLABLA1 = 0,
    BLABLA2,
    MAX_BLABLAS
}

enum blabla
{
    bbla[MAX_BLABLAS],
}

new Bla[MAX_PLAYERS][blabla];

public OnPlayerConnect(playerid)
{
    PlayerTextDrawShow(playerid, Bla[playerid][bbla][BLABLA1]);
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)