Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to build a project for Xbox, and when I try to Package as an XNA Creator's Club Game I receive the following errors:

The best overloaded method match for 'Pong.MessageBoxScreen.MessageBoxScreen(Microsoft.Xna.Framework.Game, string)' has some invalid arguments.

Argument 1: cannot convert from 'string' to 'Microsoft.Xna.Framework.Game'

Argument 2: cannot convert from 'bool' to 'string'

        /// <summary>
    /// Event handler for when the Unlock Game menu entry is selected.
    /// </summary>
    void UnlockMenuEntrySelected(object sender, PlayerIndexEventArgs e)
 #if XBOX
        catch (GamerPrivilegeException gamerPrivilegeException)
            const string message = "Please use Xbox Live account.";

            MessageBoxScreen promptForPurchase = new MessageBoxScreen(message, false);
            ScreenManager.AddScreen(promptForPurchase, e.PlayerIndex);
        const string message = "Unlock Full Game (Xbox Only)";
        MessageBoxScreen unlockMessageBox = new MessageBoxScreen(Game, message,      false);
        ScreenManager.AddScreen(unlockMessageBox, e.PlayerIndex);


Everything within the #if XBOX area is grayed out, I suppose because it is surrounded by that tag.

What do you think is suddenly causing these issues, and how can I correct it?

share|improve this question
I see code, but no error messages. – David Lively Aug 18 '12 at 20:40
What error? Please edit post. – Justin Skiles Aug 18 '12 at 20:41
Sorry, I accidentally hit "post" while I was in the middle of writing the post :p. I've since added it – Dave Voyles Aug 18 '12 at 20:42
up vote 4 down vote accepted

Based on the exception, it appears this line is at fault:

MessageBoxScreen promptForPurchase = new MessageBoxScreen(message, false);

You'll see that the error message tells you exactly what is wrong. You are passing arguments that are invalid for that constructor. You need to pass a Microsoft.Xna.Framework.Game object as the first argument and a String as the second argument.

share|improve this answer
That was exactly it. I don't remember ever changing this constructor, but when I went back and compared it to the GSM sample, it appears that I must have at some point. Thank you! – Dave Voyles Aug 20 '12 at 10:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.