13.04.2009, 14:21
I've been interested in using the GetMaxPlayers() command as a constant, much like:
#define max_players GetMaxPlayers()
or
const max_players=GetMaxPlayers();
You know, so that I could build arrays based upon the server's limitations, like:
new doohickeys[max_players][3]
or something similar...
To me it seems logical that either should work but the first one just gives an error and the second causes a crash...
What is it that (in my advanced old age) has slipped through the cracks of my rapidly deteriorating grey matter? Some rule about constants I've overlooked?
Curious...
#define max_players GetMaxPlayers()
or
const max_players=GetMaxPlayers();
You know, so that I could build arrays based upon the server's limitations, like:
new doohickeys[max_players][3]
or something similar...
To me it seems logical that either should work but the first one just gives an error and the second causes a crash...
What is it that (in my advanced old age) has slipped through the cracks of my rapidly deteriorating grey matter? Some rule about constants I've overlooked?
Curious...