About variables
#1

Well, we use player variables in our servers, something like: new Variable[MAX_PLAYERS].
I was just wondering, other servers, they could do: new Variable[MAX_GROUPS].
And they can do any names. I tried using new Variable[MAX_GROUPS] but it says MAX_GROUPS is undefined.
Reply
#2

If you don't have a group system, it will not work.
You can #define MAX_GROUPS (amount) but, like I said, if you don't have a group system, it won't work.
Reply
#3

But... this won't work.
#define MAX_GROUPS 100
new Variable[MAX_GROUPS];
Variable[groupid] = 1;
Reply
#4

Like I said, if you don't have a group system, it will not work.
Reply
#5

That is why I am creating a group system.
Reply
#6

pawn Код:
#define MAX_GROUPS 100
new Variable[MAX_GROUPS];
These two lines alone will work. It all depends on where 'Variable[groupid] = 1;' is placed and what 'groupid' is defined as.
Reply
#7

You can obviously define it, and then take a look at other group includes (ignore y_groups - it's too complicated at this level) to see how it is used.
Reply
#8

pawn Код:
#define MAX_GROUPS 100
new Variable[MAX_GROUPS];
CMD:variable(playerid, params[])
{
    Variable[groupid] = 1;
    return 1;
}
(1992) : error 017: undefined symbol "groupid"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)