Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:31:53+00:00 2026-06-07T05:31:53+00:00

I am creating a game that has players swiping the planes into the correct

  • 0

I am creating a game that has players swiping the planes into the correct lanes. However, I recently added a airplane to my game screen. However, Xcode says that I am using and undeclared identifier. I am new to this so please help.

Here is my header file controlling the game.
GamePlayViewController.h

#import <UIKit/UIKit.h>

@interface GamePlayViewController : UIViewController

@end

Here is my GamePlayViewController.m This is where the error appears.

    #import "GamePlayViewController.h"

#import "Airplane.h"

@interface GamePlayViewController ()

@end

@implementation GamePlayViewController

-(void) viewWillAppear:(BOOL)animated {
    //Add a vehicle
    Airplane* v = [[Airplane alloc]
                   initWithFrame:CGRectMake(221, 228, 0, 0)
                   [self.view addSubview:v];
}

@end

The error is at the Airplane* v [[Airplane alloc]. It says Use of undeclared identifier “Airplane” and also “v”

I have searched all over Google and Stackoverflow for the answer, but none of the scenarios matched my situation.

By the way, thanks in advance to whoever answers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:31:54+00:00Added an answer on June 7, 2026 at 5:31 am

    Where do you declare image from this line?

    image = [loadedImage retain];
    

    my guess is you don’t.


    Add this:

     @property (nonatomic, retain) UIImage *image;
    

    …to your .h, and this to your .m:

    @synthesize image;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im creating a game that has multiple levels and the levels contain multiple textures
I'm creating a mobile game that that has two parts. The first is slow,
I am creating a database that tracks replays for a game. Each replay has
The game that I am creating has a highScore integer variable that gets assigned
I'm creating a game where objects fall from the sky that the user has
I m creating a game, in that i want to use some animation, but
I am creating a game with winforms C#. The game contains some images that
I am creating a Stratego Game and am having trouble creating an algorithm that
i'm creating a card game on iphone. My problem is that i want to
I am new to XNA, and I am creating a simple game. Sorry that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.