for loop seems to be stopping the script from progressing.
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
It would still be exactly the same in C - "MAX_PLAYERS" is a define:

pawn Код:
#define MAX_PLAYERS 10

new arr[MAX_PLAYERS];

for (new i = 0; i <= MAX_PLAYERS; ++i)
{
}
During compilation, "MAX_PLAYERS" is replaced by "10":

pawn Код:
new arr[10];

for (new i = 0; i <= 10; ++i)
{
}
Making that code wrong. Essentially, "MAX_PLAYERS" IS a specific number, it just doesn't use the digits 0-9.
Even in that scenario, you'd have to #undef MAX_PLAYERS in order to redefine it. Just saying.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)