简体   繁体   English

语音JavaScript中的意外标识符

[英]Unexpected Identifier in Javascript for speech

I'm making a Visual Novel and I've come across an error in the code for the speech from the main character. 我正在制作视觉小说,但遇到主要人物的语音代码错误。 Here is the code which I've tried using. 这是我尝试使用的代码。

chapter1 = {
    label, "chapter1"
    text, {
        value: "Ughhhh",
        speaker: "Me",
        append: false,
        align: "left"
    },
];

Can I ask what I'm doing wrong or what I'm missing? 我可以问自己做错了什么还是想念什么? And also, I've checked it out and it says that the unexpected identifier is the text, { part of the code 而且,我已经检查了一下,并说意外的标识符是text, {

I think this is the format you're looking for: 我认为这是您要寻找的格式:

chapter1 = {
    label: "chapter1",
    text: {
        value: "Ughhhh",
        speaker: "Me",
        append: false,
        align: "left"
    }
};

Your last bracket didn't match up, and you had commas instead of colons to set values. 您的最后一个括号不匹配,您使用逗号而不是冒号来设置值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM