So I'm trying to get this script to work where users can use tts in multiple locales with the default locale having to be changed. The script does not load whatsoever and I've checking back and forth with the say() function and how to use it. Currently I am trying to get it to work with japanese.
	
	
	
		
Error in the logs
	
	
	
		
Line of code causing the error
	
	
	
		
Usage according to the script api
	
	
	
		
For some reason I can't get it to use the tts with a different locale. If I did a basic script that had
	
	
	
		
it would work
		
		Code:
	
	registerPlugin({
    name: 'TTS Locales',
    version: '1.0',
    description: 'TTS Locales',
    author: 'kanalumaddela',
    vars: {
        locale: {
            title: 'Locale to use',
            type: 'string'
        }
    }
}, function(sinusbot, config) {
        sinusbot.on('chat', function(ev) {
             if (ev.msg.startsWith('!japanese ')) {
                  var message = ev.msg.substring(10);
                  sinusbot.say('This message is in english, ' + ev.msg.substring(10)); //debugging shit
                  sleep(5000); //debugging shit
                  sinusbot.say(message[, config.locale]);
                  sleep(5000); //debugging shit
                  sinusbot.say('This is a backup phrase to say to make sure the TTS is working'); //debugging shit
                  return;
             }
        });
});Error in the logs
		Code:
	
	2016/08/24 23:59:16 [GENERAL/SCRIPTS] WARN   Could not load script (anonymous): Line 18:40 Unexpected token , (and 2 more errors)Line of code causing the error
		Code:
	
	sinusbot.say(message[, config.locale]);Usage according to the script api
		Code:
	
	say(text[, locale])For some reason I can't get it to use the tts with a different locale. If I did a basic script that had
		Code:
	
	sinusbot.say('hello');
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
	 
 
		