MAX_PLAYERS v. GetMaxPlayers()
#3

Quote:
Originally Posted by Mionee
Посмотреть сообщение
Yes, I believe so.

I'm not 100% sure if it would return accurate values though, you should wait for someone to reply who has experimented with it.
That lighted it up a fair bit.

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
You can't use a function call as an array size since array sizes must be known at compile time. The compiler knows that MAX_PLAYERS means 500 because it's just a define directive (effectively just search & replace before compile time). GetMaxPlayers is unknown because it's a function call that returns whatever the server read from server.cfg.
Great explanation! I did thought that the function is variable (changing) but nevertheless, I did redefine the default MAX_PLAYERS which did the trick (to avoid inefficiency).
Reply


Messages In This Thread
MAX_PLAYERS v. GetMaxPlayers() - by Neil. - 04.10.2014, 22:50
Re: MAX_PLAYERS v. GetMaxPlayers() - by Dignity - 04.10.2014, 23:06
Re: MAX_PLAYERS v. GetMaxPlayers() - by Neil. - 04.10.2014, 23:40

Forum Jump:


Users browsing this thread: 2 Guest(s)