2016-03-19 15 views
-8
if (typeof scriptLoadedMeowPuff === "undefined") { 
var scriptLoadedMeowPuff = true; 
var MTYPEWON = 0; 

// when a message is recieved in chat... 
MPP.client.on("a", (msg) => { 
     if (msg.a.indexOf(MPP.client.getOwnParticipant().name + "First person ") !== -1 && msg.p._id === ("903bcaadc5c62dbf197798a0")) { 
     MPP.chat.send("msg.p.a".split("First person to type this wins: ")) 
     } 
    } 
}; 
    console.log("%c You already pasted the script, " + MPP.client.getOwnParticipant().name + "!\n\n Refresh and paste the code again to see any changes.", "background: #000; color: #ff3333"); 
}; 
+0

Yalnızca parantezlerinizi ve parantezlerinizi eşleştirin: parantezle eşleşen ifadeleri yavaş yavaş silin ve "if() {MPP.client.on (" a ",() => {}};};'; ve hataların olduğu yer burası. – Xufox

cevap

0

Bu sizin için daha iyi çalışması gerekir:

if (typeof scriptLoadedMeowPuff === "undefined") { 
var scriptLoadedMeowPuff = true; 
var MTYPEWON = 0; 

// when a message is recieved in chat... 
MPP.client.on("a", (msg) => { 
     if (msg.a.indexOf(MPP.client.getOwnParticipant().name + "First person ") !== -1 && msg.p._id === ("903bcaadc5c62dbf197798a0")) { 
     MPP.chat.send("msg.p.a".split("First person to type this wins: ")); 
     } 
    } 
); 
    console.log("%c You already pasted the script, " + MPP.client.getOwnParticipant().name + "!\n\n Refresh and paste the code again to see any changes.", "background: #000; color: #ff3333"); 
} 

DÜZENLEME Ah, Frayne de ah ilk var.

0

sorun MPP.client.on( ile, sen ( ile başlar ama } ile sona, Ve eğer durum sonrasında açıklama kullanmaya gerek, üst koşulu eğer sende bunu yaptı.

if (typeof scriptLoadedMeowPuff === "undefined") { 
    var scriptLoadedMeowPuff = true; 
    var MTYPEWON = 0; 

    // when a message is recieved in chat... 
    MPP.client.on("a", (msg) => { 
    if (msg.a.indexOf(MPP.client.getOwnParticipant().name + "First person ") !== -1 && msg.p._id === ("903bcaadc5c62dbf197798a0")) { 
     MPP.chat.send("msg.p.a".split("First person to type this wins: ")); 
    } 
    }); 
    console.log("%c You already pasted the script, " + MPP.client.getOwnParticipant().name + "!\n\n Refresh and paste the code again to see any changes.", "background: #000; color: #ff3333"); 
} 
İlgili konular