Thread: How do I fix this error? [667]

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 How do I fix this error? [667] 
    Registered Member
    Join Date
    Aug 2013
    Posts
    112
    Thanks given
    12
    Thanks received
    3
    Rep Power
    11
    I'm trying to add Gambler NPC but I keep getting this error?

    Code:
    src\com\rs\game\player\dialogues\Gambler.java:21: error: ')' expected
            ("How much do you wish to gamble?", "10,000gp", "100,000gp", "1,000,000g
    p", "10,000,000gp", "Actually, not right now.");
                                              ^
    Reply With Quote  
     

  2. #2  
    Owner Of Zyphyr
    Motherboard's Avatar
    Join Date
    Oct 2013
    Age
    30
    Posts
    373
    Thanks given
    1
    Thanks received
    78
    Rep Power
    22
    put the gambler dialogue in [Only registered and activated users can see links. ] and ill fix it.


    [Only registered and activated users can see links. ]

    "It is only when a mosquito lands on your testicle that you realize,
    there is always a way to solve problems without using violence" - Einstein

    [1:54:18 AM] Telopya: what is the login server supposed to do?
    [1:54:38 AM] Motherboard ~ Brandon: u dont know what a login server does?
    [1:55:20 AM] Telopya: [Only registered and activated users can see links. ] oh please explain me senpai
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2013
    Posts
    112
    Thanks given
    12
    Thanks received
    3
    Rep Power
    11
    [Only registered and activated users can see links. ] there you go, thanks
    Reply With Quote  
     

  4. #4  
    Owner Of Zyphyr
    Motherboard's Avatar
    Join Date
    Oct 2013
    Age
    30
    Posts
    373
    Thanks given
    1
    Thanks received
    78
    Rep Power
    22
    Code:
    package com.rs.game.player.dialogues;
     
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.player.Gamble;
     
    public class Gambler extends Dialogue {
     
            private int npcId;
     
            @Override
            public void start() {
                    sendEntityDialogue(SEND_2_TEXT_CHAT,
                                    new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
                                                    "Hello, Wanna take a chance to double your GP?"}, IS_NPC, npcId, 2998);
            }
           
            @Override
            public void run(int interfaceId, int componentId) {
                    if (stage == -1) {
            sendOptionsDialogue
            ("How much do you wish to gamble?", "10,000gp", "100,000gp", "1,000,000gp", "10,000,000gp", "Actually, not right now.");
                            stage = 1;
                    } else if (stage == 1) {
                            if (componentId == 1) {
                                    new Gamble(player, 10000);
                                    end();
                                    }
                            else if (componentId == 2) {
                                    new Gamble(player, 100000);
                                    end();
                                    }
                            else if (componentId == 3) {
                                    new Gamble(player, 1000000);
                                    end();
                                    }
                            else if (componentId == 4) {
                                    new Gamble(player, 10000000);
                                    end();
                                    }
                            else if (componentId == 5) {
                                    player.sm("Come back if you want to try!");
                                    end();
                                    }
                            }
                    }
     
            @Override
            public void finish() {
     
            }
    }
    try that.


    [Only registered and activated users can see links. ]

    "It is only when a mosquito lands on your testicle that you realize,
    there is always a way to solve problems without using violence" - Einstein

    [1:54:18 AM] Telopya: what is the login server supposed to do?
    [1:54:38 AM] Motherboard ~ Brandon: u dont know what a login server does?
    [1:55:20 AM] Telopya: [Only registered and activated users can see links. ] oh please explain me senpai
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Aug 2013
    Posts
    112
    Thanks given
    12
    Thanks received
    3
    Rep Power
    11
    Now I get this. :/
    Code:
    src\com\rs\game\player\dialogues\Gambler.java:20: error: cannot find symbol
            sendOptionsDialogue
            ^
      symbol:   method sendOptionsDialogue(String,String,String,String,String,String
    )
      location: class Gambler
    Note: src\com\rs\game\player\Inventory.java uses unchecked or unsafe operations.
    
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    compiled Player folder
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,417
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Quote Originally Posted by herpityderp View Post
    Now I get this. :/
    Code:
    src\com\rs\game\player\dialogues\Gambler.java:20: error: cannot find symbol
            sendOptionsDialogue
            ^
      symbol:   method sendOptionsDialogue(String,String,String,String,String,String
    )
      location: class Gambler
    Note: src\com\rs\game\player\Inventory.java uses unchecked or unsafe operations.
    
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    compiled Player folder
    Title + 4 options, not title+5 options
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Aug 2013
    Posts
    112
    Thanks given
    12
    Thanks received
    3
    Rep Power
    11
    there is 5 options though
    Reply With Quote  
     

  8. #8  
    Owner Of Zyphyr
    Motherboard's Avatar
    Join Date
    Oct 2013
    Age
    30
    Posts
    373
    Thanks given
    1
    Thanks received
    78
    Rep Power
    22
    Code:
    package net.zyphyr.server.entity.character.dialogues;
    
    import net.zyphyr.cache.loaders.NPCDefinitions;
     
    
     
    public class Gambler extends Dialogue {
     
            private int npcId;
     
            @Override
            public void start() {
                    sendEntityDialogue(SEND_2_TEXT_CHAT,
                                    new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
                                                    "Hello, Wanna take a chance to double your GP?"}, IS_NPC, npcId, 2998);
            }
           
            @Override
            public void run(int interfaceId, int componentId) {
                    if (stage == -1) {
            sendDialogue(SEND_5_OPTIONS("How much do you wish to gamble?", "10,000gp", "100,000gp", "1,000,000gp", "10,000,000gp", "Actually, not right now."));
                            stage = 1;
                    } else if (stage == 1) {
                            if (componentId == 1) {
                                    //new Gamble(player, 10000);
                                    end();
                                    }
                            else if (componentId == 2) {
                                   // new Gamble(player, 100000);
                                    end();
                                    }
                            else if (componentId == 3) {
                                    //new Gamble(player, 1000000);
                                    end();
                                    }
                            else if (componentId == 4) {
                                   // new Gamble(player, 10000000);
                                    end();
                                    }
                            else if (componentId == 5) {
                                    player.sm("Come back if you want to try!");
                                    end();
                                    }
                            }
                    }
     
        
    
    		private String SEND_5_OPTIONS(String string, String string2,
    				String string3, String string4, String string5, String string6) {
    			// TODO Auto-generated method stub
    			return null;
    		}
    
    		@Override
            public void finish() {
     
            }
    }


    [Only registered and activated users can see links. ]

    "It is only when a mosquito lands on your testicle that you realize,
    there is always a way to solve problems without using violence" - Einstein

    [1:54:18 AM] Telopya: what is the login server supposed to do?
    [1:54:38 AM] Motherboard ~ Brandon: u dont know what a login server does?
    [1:55:20 AM] Telopya: [Only registered and activated users can see links. ] oh please explain me senpai
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Aug 2013
    Posts
    112
    Thanks given
    12
    Thanks received
    3
    Rep Power
    11
    Quote Originally Posted by Brrandon View Post
    Code:
    package net.zyphyr.server.entity.character.dialogues;
    
    import net.zyphyr.cache.loaders.NPCDefinitions;
     
    
     
    public class Gambler extends Dialogue {
     
            private int npcId;
     
            @Override
            public void start() {
                    sendEntityDialogue(SEND_2_TEXT_CHAT,
                                    new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
                                                    "Hello, Wanna take a chance to double your GP?"}, IS_NPC, npcId, 2998);
            }
           
            @Override
            public void run(int interfaceId, int componentId) {
                    if (stage == -1) {
            sendDialogue(SEND_5_OPTIONS("How much do you wish to gamble?", "10,000gp", "100,000gp", "1,000,000gp", "10,000,000gp", "Actually, not right now."));
                            stage = 1;
                    } else if (stage == 1) {
                            if (componentId == 1) {
                                    //new Gamble(player, 10000);
                                    end();
                                    }
                            else if (componentId == 2) {
                                   // new Gamble(player, 100000);
                                    end();
                                    }
                            else if (componentId == 3) {
                                    //new Gamble(player, 1000000);
                                    end();
                                    }
                            else if (componentId == 4) {
                                   // new Gamble(player, 10000000);
                                    end();
                                    }
                            else if (componentId == 5) {
                                    player.sm("Come back if you want to try!");
                                    end();
                                    }
                            }
                    }
     
        
    
    		private String SEND_5_OPTIONS(String string, String string2,
    				String string3, String string4, String string5, String string6) {
    			// TODO Auto-generated method stub
    			return null;
    		}
    
    		@Override
            public void finish() {
     
            }
    }
    sigh.. still no luck. do you have TV or something so you can look at my files? here's what that gave me.
    Code:
    src\com\rs\game\player\dialogues\Gambler.java:22: error: method sendDialogue in
    class Dialogue cannot be applied to given types;
            sendDialogue(SEND_5_OPTIONS("How much do you wish to gamble?", "10,000gp
    ", "100,000gp", "1,000,000gp", "10,000,000gp", "Actually, not right now."));
            ^
      required: short,String[]
      found: String
      reason: actual argument String cannot be converted to short by method invocati
    on conversion
    Note: src\com\rs\game\player\Inventory.java uses unchecked or unsafe operations.
    
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    compiled Player folder
    Reply With Quote  
     

  10. #10  
    Owner Of Zyphyr
    Motherboard's Avatar
    Join Date
    Oct 2013
    Age
    30
    Posts
    373
    Thanks given
    1
    Thanks received
    78
    Rep Power
    22
    PM me your skype name, i'm not getting any errors in eclipse. I have no idea why. It works for me :L


    [Only registered and activated users can see links. ]

    "It is only when a mosquito lands on your testicle that you realize,
    there is always a way to solve problems without using violence" - Einstein

    [1:54:18 AM] Telopya: what is the login server supposed to do?
    [1:54:38 AM] Motherboard ~ Brandon: u dont know what a login server does?
    [1:55:20 AM] Telopya: [Only registered and activated users can see links. ] oh please explain me senpai
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. How do i fix this error?!
    By leftbehind20 in forum Help
    Replies: 11
    Last Post: 02-21-2012, 06:20 AM
  2. how do i fix this error
    By CoderMark in forum Help
    Replies: 10
    Last Post: 08-27-2011, 09:18 PM
  3. How do i fix this error
    By gracy258 in forum Help
    Replies: 3
    Last Post: 05-19-2011, 05:30 PM
  4. 614 how do i fix this error ?
    By Spoon Man in forum Help
    Replies: 3
    Last Post: 09-28-2010, 04:34 AM
  5. how do i fix this error
    By apur3slife in forum Help
    Replies: 2
    Last Post: 08-27-2009, 07:57 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
  •