Results 1 to 5 of 5
  1. #1
    xoxoJenny is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default Hi there, its jenny! I need some help with some code please. :)

    Hi there,
    My name is Jenny, and i was trying to make a quick typer for a game called minecraft, just something seems to be wrong with my code :( can you guys help me please?

    Java Code:
    class apples{
      public static void main(String args[]){
        if (numpad1) {"t Hi there, im jenny :)"};
      }
    }
    I hope you guys can help me :) im still kind of new to this :P

    XoXoXo, Jenny.
    Last edited by sunde887; 08-15-2011 at 01:41 AM. Reason: Removed color and formatted code

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,762
    Rep Power
    7

    Default

    Gaaah!

    Please do not use colours when posting.

    just something seems to be wrong
    Do you feel like sharing? If you get errors then copy and paste the full and exact message.

  3. #3
    xoxoJenny is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default

    Sorry,
    Heres the error Eclipse gives me when i try and run it.
    Java Code:
    Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    	numpad1 cannot be resolved to a variable
    	Syntax error, insert "AssignmentOperator Expression" to complete Assignment
    	Syntax error, insert ";" to complete BlockStatements
    	The left-hand side of an assignment must be a variable
    
    	at apples.main(Apples.java:4)

  4. #4
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    An if clause takes a Boolean variable(or expression), but your code just attempts to use some variable named numpad1, it doesn't declare it anywhere nor initialize it.

    This looks mostly like a simple hello, world type program(which is definitely a good starting point). Have you tried checking out the java tutorials? They are extremely well written and can be easily found by googling "really big index".

  5. #5
    xoxoJenny is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default

    Quote Originally Posted by sunde887 View Post
    An if clause takes a Boolean variable(or expression), but your code just attempts to use some variable named numpad1, it doesn't declare it anywhere nor initialize it.

    This looks mostly like a simple hello, world type program(which is definitely a good starting point). Have you tried checking out the java tutorials? They are extremely well written and can be easily found by googling "really big index".
    Ok thank you. :)

Similar Threads

  1. Replies: 3
    Last Post: 08-10-2011, 09:17 AM
  2. Replies: 0
    Last Post: 08-07-2011, 08:32 PM
  3. Replies: 0
    Last Post: 02-21-2011, 11:50 AM
  4. Replies: 1
    Last Post: 03-04-2010, 11:19 AM
  5. Replies: 1
    Last Post: 04-26-2007, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •