 |
|
Member
|

09-03-2022
, 02:49
Re: Trying to Understand #define Macros values in War3TFT
|
#9
|
I believe those are boolean (true/false) 2D arrays which manage player related data, 2D arrays are like a table with rows and columns, each player represents a row, and the required information on that player represents a column. So PB_ISCONNECTED=31 means that the 32nd (not 31st, since indices start from 0) column represents which players are connected, so when a player connects, you check his row in that column and enable it (set it to true), when he disconnects you set it to false, and when you want to check if he's connected at any point, you just check his field in that column. I believe PB_LAST is used to tell the plugin how many columns you wanna add, so it marks the last column. So if you wanna add another column, you increase PB_LAST by one, and you define that new column, say #define PB_IS_AFK 32, and PB_LAST 33
|
|
|
|