Question: I am trying to make a game that will generate random numbers and the user will have to guess it.

```
package numberguess;

import java.util.Random;
import javax.swing.JOptionPane;

public class NumberGuess {

    public void program() {
        int guess1,nmbr;
        Random rand = new Random();
        nmbr = rand.nextInt(100);

        while(true){
            guess1 = Integer.valueOf(JOptionPane.showInputDialog("enter a # 1-100"));
        }

        if(guess1 < nmbr); {
            JOptionPane.showMessageDialog(null, "numerber is too small");
            guess1++;
        }
        else if (guess1 > nmbr) {
            JOptionPane.showMessageDialog(null, "number is too big");
            guess1++;
        }
        else{
            JOptionPane.showMessageDialog(null, "Congratulations you guessed correctly:" + nmbr);
            guess1++;
            break;
        }
    }

    public static void main(String[] args){
            NumberGuess prog = new NumberGuess();
            prog.program();
    }
}

```

Answer: 
Seems like you need to define your permissions first.

```
var permissions = ["public_profile"]

   PFFacebookUtils.logInWithPermissions(permissions, {
        (user: PFUser!, error: NSError!) -> Void in
        if user == nil {
            NSLog("Uh oh. The user cancelled the Facebook login.")

```

If you imported your headers correctly it should show no errors in Xcode when you call parse/facebook functions.
You're getting the error because the compiler expects a declaration, that is a variable declaration or method declaration.

It looks like you have the PFFacebookUtils.loginWithPermission(...) code directly inside the class. You need to put it inside a method. For example:

```
import UIKit

class FBLoginViewController: UIViewController {

    func login() {
        //
        PFFacebookUtils.logInWithPermissions(permissions, {
            //
        }
    }
})

```