[lua] Need help with Print, Maxclients and server IP

mardi 8 septembre 2015

Hello there.

I've recently installed an addon written in lua that automatically creates a temporary channel whenever you connect to a server. Now I want to change this addon in two ways:

1. Set the maximum number of clients allowed in the channel that I create to 3.
I've tried the following line, to no success:
Code:

ts3.setChannelVariableAsInt(serverConnectionHandlerID, 0,ts3defs.ChannelProperties.CHANNEL_MAXCLIENTS,3)
and similarly with SetChannelVariableAsString. Neither has worked. However, in the line above, setting CHANNEL_NAME and CHANNEL_PASSWORD works exactly like this, so I'm confounded on why it doesn't work.

2. Only create the channel when connecting to a specific IP.
My idea here is to get the current IP and connect it to the IP I want. If they aren't the same, I simply do a return and I'm done. However, I can't seem to find a function to get the current IP.

(3.) When debugging the above, I've been trying to use the print function. However, I can't seem to find where the print is output to. Nowhere I look can I find any of the text I try to print, for example the following:
Code:

print("Test")
[lua] Need help with Print, Maxclients and server IP

0 commentaires:

Enregistrer un commentaire