• 11-03-2019, 15:28:39
    #1
    elseif ($cmd == 'comment') {
                        $text = $values[0];
                        if ($text !== "") {
                            $ig->live->comment($broadcastId, $text);
                            Utils::log("Commented on stream!");
                        } else {
                            Utils::log("Comments may not be empty!");
                        }
                    }
    Yukarıdaki kod düzgünce çalışıyor ama aşağıdaki kodu çalıştırdığımda hata alıyorum. Catch olmasına rağmen hata mesajı yazmıyor. Wave komutunda hata alıyorum wave komutunu yazınca 541. satırda hata var diyor ve 541. satırdaki kod bu:
    elseif ($cmd == 'wave') {
                        $viewerId = $values[0];
                        try {
                            $ig->live->wave($broadcastId, $viewerId);
                            Utils::log("Waved at a user!");
                        } catch (Exception $waveError) {
                            Utils::log("Could not wave at user! Make sure you're waving at people who are in the stream. Additionally, you can only wave at a person once per stream!");
                            Utils::dump($waveError->getMessage());
                        }
                    }
    Yardımcı olabilecek varsa çok sevinirim.
  • 11-03-2019, 18:54:02
    #2
    Üyeliği durduruldu
    Kodlarınızın tamamı ve aldığınız hatayı belirtirseniz, daha hızlı cevap verebiliriz.
  • 11-03-2019, 19:06:04
    #3
    $text = $values[0];
    if ($text !== "") {
    yerine
    if(isset($values[0]) && $values[0]!=''){
    $text = $values[0];

    önce values 0 ın varlığı kontrol edilir sonra boş olup olmadığı, var olmayan bişeyi boş olup olmadığı kontrol edilirken hata verebilir.