Forum

Results 1 to 3 of 3
  1. #1
    Join Date
    September 2009
    Location
    A
    Posts
    17

    TeamSpeak 3 PHP Framework - Maximum function nesting level of '100' reached, aborting

    I got this error

    Fatal error: Maximum function nesting level of '100' reached, aborting! in X:\...\ts3\fw\libraries\TeamSpeak3\Node\Abstract.p hp on line 576


    Thats my Code:
    1. Check if the old UID client has the server group if so remove it
    2. Delete the Description on old UID
    3. Set the new description on the new UID
    4. Set the new Server group to the new UID

    PHP Code:
    try
    {
        
    TeamSpeak3::init();
        
    $ts3_VirtualServer TeamSpeak3::factory("serverquery://".$server["ts_query_admin"].":".$server["ts_query_password"]."@".$server["tsip"].":".$server["ts_query_port"]."/?server_port=".$server["tsport"]."&nickname=".$server["ts_query_user_nick"]."");


    //Vars
    $SG_Gast 8;
    $SG_Registriert 7;
    $client_info $ts3_VirtualServer->clientGetByUid($UID_old);

        if(
    $part == 1)
        {
            
    //Registration geprüft und wenn vorhanden weggenommen
            
    if( isPlayerInServerGroup($client_info$SG_Registriert))
            {
                foreach(
    $ts3_VirtualServer->clientListDb() as $ts3_Client)
                {
                    if(
    $ts3_Client["client_unique_identifier"] == $UID_old)
                    {
                        try
                        {
                            
    $ts3_VirtualServer->serverGroupClientDel(7$ts3_Client["cldbid"]);
                            if(
    $debug == true)
                            {
                                echo 
    $user' wurde erfolgreich aus der Server Gruppe entfernt!';
                            }
                        }
                        catch( 
    Exception $e)
                        {
                            echo 
    'Fehler beim Versuch ' $user ' aus einer Servergruppe zu entfernen!<br/>ErrorID: <b>'$e->getCode() .'</b>; Error Message: <b>'$e->getMessage() .'</b>;<br />';
                        }
                    }
                }
            }
            else
            {
                if(
    $debug == true)
                {
                    echo 
    'Client ist nicht Registriert<br />';
                }
            }
        }


        if(
    $part == 1)
        {
            
    //Alte Beschreibung löschen
            
    try
            {
                
    $client $ts3_VirtualServer->clientGetByUid($UID_old);
                
    $properties = array("client_description" => "");
                
    $client->modify$properties );
                if(
    $debug == true)
                {
                    echo 
    'Beschreibung gel&ouml;scht<br />';
                }
            }
            catch(
    Exception $e)
            {
                echo 
    'Fehler beim setzen der Beschreibung! <br/>ErrorID: <b>'$e->getCode() .'</b>; Error Message: <b>'$e->getMessage() .'</b>;';
            }
        }

        if(
    $part == 2)
        {
            
    //Neue Beschreibung setzen
            
    try
            {
                
    $client $ts3_VirtualServer->clientGetByUid($UID_new);
                
    $properties = array("client_description" => $user);
                
    $client->modify$properties );
                if(
    $debug == true)
                {
                    echo 
    'Neue Beschreibung gesetzt<br />';
                }
            }
            catch(
    Exception $e)
            {
                echo 
    'Fehler beim setzen der Beschreibung! <br/>ErrorID: <b>'$e->getCode() .'</b>; Error Message: <b>'$e->getMessage() .'</b>;';
            }
        }



        if(
    $part == 2)
        {
            
    //Neue Servergruppe zuweisen
            
    foreach($ts3_VirtualServer->clientListDb() as $ts3_Client)
            {
                if(
    $ts3_Client["client_unique_identifier"] == $UID_new)
                {
                    try {
                        
    $ts3_VirtualServer->serverGroupClientAdd(7$ts3_Client["cldbid"]);
                        if(
    $debug == true)
                        {
                            echo 
    $user ' wurde erfolgreich in eine Server Gruppe eingeteilt!';
                        }
                    }
                    catch( 
    Exception $e)
                    {
                        echo 
    'Fehler beim Versuch ' $user ' in eine Servergruppe einzuteilen!<br/>ErrorID: <b>'$e->getCode() .'</b>; Error Message: <b>'$e->getMessage() .'</b>;';
                    }
                }
            }
        }




    }
    catch(
    Exception $e)
    {
        echo 
    'Es konnte keine Verbindung zum TS3 Server hergestellt werden! ErrorID: <b>'$e->getCode() .'</b>; Error Message: <b>'$e->getMessage() .'</b>;';
    }





    //Function
    function IsPlayerInServerGroup($client_info$server_group_id)
    {
        foreach( 
    explode(","$client_info["client_servergroups"]) as $group )
        {
            if( 
    $server_group_id == $group)
                return 
    true;
        }
        return 
    false;

    Edit:
    If I do the code in 2 parts firtst 2 Steps and second 2 steps then it works but if I do the full code on one reload it failed
    Last edited by axi92; August 9th, 2013 at 01:46 PM. Reason: Edit Code

  2. #2
    Join Date
    September 2009
    Location
    A
    Posts
    17
    Can Somebody help me?
    Impossible that Im the only one with this problem xD

  3. #3
    Join Date
    September 2010
    Location
    Germany
    Posts
    42
    Hi

    Maybe you get help there: http://forum.teamspeak.com/showthrea...amework/page44
    If you're using this Framework..

    Regards,
    Cyberwolf

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Maximum amount of clients reached
    By metalappie in forum General Questions
    Replies: 8
    Last Post: January 5th, 2011, 03:42 PM
  2. Ask: Maximum reached ...
    By Jordi in forum Suggestions and Feedback
    Replies: 1
    Last Post: January 28th, 2010, 10:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •