Hi! Hopefully I got the right place since I'm new here.

Anyway, I've stumbled upon a strange problem while trying to make a plugin that part of its job gets the total connections of a client.
Here's a little snippet of my code.
Code:
int connections;
ts3Functions.requestClientVariables(serverConnectionHandlerID, clientID, "2");
ts3Functions.getClientVariableAsInt(serverConnectionHandlerID, clientID, CLIENT_TOTALCONNECTIONS, &connections);
Since it's written that CLIENT_TOTALCONNECTIONS needs to be requested with .requestClientVariables, I obviously do that first. Then I try to acquire it as an int (because it makes sense) and store it in "connections". Here's the problem though: for some reason, the value of CLIENT_TOTALCONNECTIONS is always 0. Every single time. I've tried storing it as uint64, not request ClientVariables first, checking if the get method actually stores the value properly (it does) and some other things I can't remember anymore. I can't see any obvious reason why it turns up as 0. .requestClientVariables is successful, because onUpdateClientEvent is being called (I've made it print lines into the console, so I can see quite a lot). Unless... it actually isn't successful? After the onUpdateClientEvent, there should be latest data, but apparently there isn't. I can see total connections on the right side though with the modified .tpl file, so getting info from the server is not a problem.
What am I missing?