Why is it an error?

Hi guys I started learning kotlin today and got an error when I run this code on the IntelliJ Idea.

fun say(a: String, b: String):Unit{
println("$a $b");
fun main() {
say("Hello ",“world”);

But when I use it on the kotlin page compiler it works well.
Why is that? And if I want to use android studio should I focus more on intelli or the kotlin page?

What error do you get?

(And did the penultimate line really have curly quotes, or is that just a problem with how you pasted the code here?)