Thread: NPCDialogue Class(Custom)

Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1 NPCDialogue Class(Custom) 
    Registered Member
    Join Date
    Jul 2010
    Posts
    16
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    I need help with this NPCDialogue class I'm working on, I got the class setup correctly, but I get this errors:

    Code:
    NPCDialogue.java:7: class, interface, or enum expected
    public static client c;
                  ^
    1 error
    You have sucsessfully compiled
    Press any key to continue . . .
    the code:
    [
    Code:
    public static client c;
    I put the code like this:
    Code:
    /*
    *NPCDialogue
    *Class by Pure Demons (Zulf)
    */
    import java.io.*;
    
    public static client c;
    public class NPCDialogue {
    	
    	public static void talk(String text, int npc) {
    ^ Then the rest of the code is beneath that. Idk what to do.
    Help?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2008
    Posts
    57
    Thanks given
    0
    Thanks received
    7
    Rep Power
    8
    put public static client c; inside of the NPCDialogue class
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2010
    Posts
    16
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    I do then I get:
    Code:
    client.java:14729: cannot find symbol
    symbol  : variable talk
    location: class client
            NPCDialogue.NPCDialogue(talk);
                                    ^
    client.java:14730: cannot find symbol
    symbol  : variable talk2
    location: class client
            NPCDialogue.NPCDialogue(talk2);
                                    ^
    client.java:14731: cannot find symbol
    symbol  : variable talk3
    location: class client
            NPCDialogue.NPCDialogue(talk3);
                                    ^
    client.java:14732: cannot find symbol
    symbol  : variable talk4
    location: class client
            NPCDialogue.NPCDialogue(talk4);
                                    ^
    client.java:14733: cannot find symbol
    symbol  : variable playertalk
    location: class client
            NPCDialogue.NPCDialogue(playertalk);
                                    ^
    client.java:14734: cannot find symbol
    symbol  : variable playertalk2
    location: class client
            NPCDialogue.NPCDialogue(playertalk2);
                                    ^
    client.java:14735: cannot find symbol
    symbol  : variable playertalk3
    location: class client
            NPCDialogue.NPCDialogue(playertalk3);
                                    ^
    client.java:14736: cannot find symbol
    symbol  : variable playertalk4
    location: class client
            NPCDialogue.NPCDialogue(playertalk4);
                                    ^
    Note: stream.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    8 errors
    You have sucsessfully compiled
    Press any key to continue . . .
    Help please.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Aug 2008
    Posts
    57
    Thanks given
    0
    Thanks received
    7
    Rep Power
    8
    talk, talk2, talk3 etc arent declared. i dont know what they're supposed to be, so i cant really help you with that
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jul 2010
    Posts
    16
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    They are declared, it's just they are in NPCDialogue.java and I want client.java to load them, like TextHandler.java.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Aug 2008
    Posts
    57
    Thanks given
    0
    Thanks received
    7
    Rep Power
    8
    have you imported NPCDialogue into client?
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jul 2010
    Posts
    16
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    No, I'm new, help please? Sorry I'm so annoying, heres my msn: [email protected]
    Reply With Quote  
     

  8. #8  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    Use mine, I released it a few weeks ago on 3 forums.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jul 2010
    Posts
    16
    Thanks given
    0
    Thanks received
    1
    Rep Power
    1
    Quote Originally Posted by i r maggot View Post
    Use mine, I released it a few weeks ago on 3 forums.
    What forums? And what do I search for, but I would really like to know how to use a seperate class in client.java
    Reply With Quote  
     

  10. #10  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

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