Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS3 error when using custom query port. #197

Open
wohahobg opened this issue Apr 23, 2024 · 3 comments
Open

TS3 error when using custom query port. #197

wohahobg opened this issue Apr 23, 2024 · 3 comments

Comments

@wohahobg
Copy link

Hello again,

for some reason when using custom query port for TS3 it give Call to a member function cutString() on int

now that's due this code

while ($val = $buffer->cutString(7 + 7 * $ver, $param[$ver][2])) {
    $key = Helper::lgslCutString($val, 0, '=');
    $items[$key] = $val;
}

so I did var_dump for $buffer above the while loop and it return 2 (int)

Example server:

        $server = new \tltneon\LGSL\Server([
            "ip" => "37.114.35.5", // server ip or hostname
            "c_port" => 9051, // for players
            "q_port" => 9152, // for querying
            "type" => "ts3" // protocol name
        ]);
        $server->lgsl_live_query("se"); // s - server info, e - extra data, p - players info
        echo '<pre>';
        print_r($server->toArray());
        echo '</pre>';

But if we do like that:

        $server = new \tltneon\LGSL\Server([
            "ip" => "37.114.35.5", // server ip or hostname
            "c_port" => 9152, // for players
            "q_port" => 9152, // for querying
            "type" => "ts3" // protocol name
        ]);
        $server->lgsl_live_query("se"); // s - server info, e - extra data, p - players info
        echo '<pre>';
        var_dump($server->isOnline());
        echo '</pre>';

setting the query port as c port is showing that the server is online, but does not return the players.

@tltneon

This comment was marked as off-topic.

@wohahobg
Copy link
Author

wohahobg commented Jun 3, 2024

Hey thanks for the response @tltneon

Well i am not sure about that ?

Because when default port is used is taking information. But when is like different port than default is not working.

@tltneon
Copy link
Owner

tltneon commented Jun 6, 2024

I looked closer to TS3 and found that @wohahobg you're right, this is not a version problem.
Privilege settings: https://www.tsviewer.com/index.php?page=faq&id=6
I added some error messages in last commit and also tried it by myself on port 10010 - everything works. Try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants