Thread: Need help with compiling server

Results 1 to 8 of 8
  1. #1 Need help with compiling server 
    Registered Member

    Join Date
    May 2015
    Posts
    174
    Thanks given
    100
    Thanks received
    45
    Rep Power
    107
    Hi, I'm using Solace 1.1 right now, I've followed these snippets, & have added Woodcutting & Mining from here:

    https://www.rune-server.ee/runescape...xes-tools.html

    I'm stuck on one part however. This line: ObjectManager.registerObject(new GameObject(location, ore.getReplacementId(), objectId, ore.getRespawnTimer())); It wont compile with this.

    So far I've figured out that 'registerObject' is 'submitPrivateObject' I believe.

    Here is the download to the server if you'd like to take a look:

    https://www.mediafire.com/file/0h4i3...e-e46.zip/file

    Thank you! Any help is appreciated. =)
    - Snow.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jan 2012
    Posts
    191
    Thanks given
    45
    Thanks received
    87
    Rep Power
    0
    Post a screenshot of the error and maybe some of the code related to it
    Reply With Quote  
     

  3. #3  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Seems like an outdated source so some issues could be with higher revision of compiler.
    However what issue in the compiler do you have about 'ObjectManager.registerObject(new GameObject(location, ore.getReplacementId(), objectId, ore.getRespawnTimer()));' ?


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    May 2015
    Posts
    174
    Thanks given
    100
    Thanks received
    45
    Rep Power
    107
    Hi, thank you for the replies~! =)

    I get this error:

    Code:
    Solace-e47\src\org\solace\game\content\skills\mining\Mining.java:282:43
    java: constructor GameObject in class org.solace.game.entity.object.GameObject cannot be applied to given types;
      required: org.solace.game.map.Location,int,int,int,org.solace.game.entity.mobile.player.Player
      found: org.solace.game.map.Location,int,int,int
      reason: actual and formal argument lists differ in length
    Line 283 is what I gave before, but this is the full section:

    Code:
     /**
         * Creates a new object and handles player details when it comes to mining
         *
         *    @Param player
         *            The player mining
         *    @Param location
         *            the location of the ore
         *    @Param ore
         *            The ore the player is mining
         *    @Param objectId
         *            The id of the ore the player is mining
         */
        private static void handleObjectReplacement(Player player, Location location, OreDefinitions ore, int objectId) {
            ObjectManager.submitPrivateObject(new GameObject(location, ore.getReplacementId(), objectId, ore.getRespawnTimer()));
            player.getSkills().addSkillExp(SkillHandler.MINING, ore.getExperience());
            player.setAnimation(Animation.create(65535));
            player.getPacketDispatcher().sendMessage("You managed to mine some " + ore.getOreName() + " ore.");
            player.getInventory().add(new Item(ore.getItemId(), 1));
        }
    Nvm, I think I found out the issue, 'player' wasn't included.
    Code:
      ObjectManager.submitPrivateObject(new GameObject(location, ore.getReplacementId(), objectId, ore.getRespawnTimer(), player));
    Thanks! =)
    - Snow
    Reply With Quote  
     

  5. #5  
    Chemist

    Advocatus's Avatar
    Join Date
    Dec 2009
    Posts
    2,622
    Thanks given
    201
    Thanks received
    813
    Rep Power
    1462
    Quote Originally Posted by SnowEssence View Post
    Hi, thank you for the replies~! =)

    I get this error:

    Code:
    Solace-e47\src\org\solace\game\content\skills\mining\Mining.java:282:43
    java: constructor GameObject in class org.solace.game.entity.object.GameObject cannot be applied to given types;
      required: org.solace.game.map.Location,int,int,int,org.solace.game.entity.mobile.player.Player
      found: org.solace.game.map.Location,int,int,int
      reason: actual and formal argument lists differ in length
    Line 283 is what I gave before, but this is the full section:

    Code:
     /**
         * Creates a new object and handles player details when it comes to mining
         *
         *   @Param player
         *            The player mining
         *   @Param location
         *            the location of the ore
         *   @Param ore
         *            The ore the player is mining
         *   @Param objectId
         *            The id of the ore the player is mining
         */
        private static void handleObjectReplacement(Player player, Location location, OreDefinitions ore, int objectId) {
            ObjectManager.submitPrivateObject(new GameObject(location, ore.getReplacementId(), objectId, ore.getRespawnTimer()));
            player.getSkills().addSkillExp(SkillHandler.MINING, ore.getExperience());
            player.setAnimation(Animation.create(65535));
            player.getPacketDispatcher().sendMessage("You managed to mine some " + ore.getOreName() + " ore.");
            player.getInventory().add(new Item(ore.getItemId(), 1));
        }


    Thanks! =)
    - Snow
    Per the error, you should just change

    ObjectManager.submitPrivateObject(new GameObject(location, ore.getReplacementId(), objectId, ore.getRespawnTimer()));

    to

    ObjectManager.submitPrivateObject(new GameObject(location, ore.getReplacementId(), objectId, ore.getRespawnTimer(), player));
    Quote Originally Posted by blakeman8192 View Post
    Quitting is the only true failure.
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Registered Member

    Join Date
    Aug 2015
    Posts
    78
    Thanks given
    35
    Thanks received
    25
    Rep Power
    110
    The constructor GameObject in class org.solace.game.entity.object.GameObject requires

    org.solace.game.map.Location,int,int,int,org.solac e.game.entity.mobile.player.Player

    but you gave it org.solace.game.map.Location,int,int,int
    Reply With Quote  
     

  8. Thankful user:


  9. #7  
    Registered Member

    Join Date
    May 2015
    Posts
    174
    Thanks given
    100
    Thanks received
    45
    Rep Power
    107
    Thanks all! So it was the 'player' not being included. Good to know. Cheers!

    Snow.
    Reply With Quote  
     

  10. #8  
    Registered Member x's Avatar
    Join Date
    May 2019
    Posts
    195
    Thanks given
    61
    Thanks received
    54
    Rep Power
    63
    Quote Originally Posted by SnowEssence View Post
    Thanks all! So it was the 'player' not being included. Good to know. Cheers!

    Snow.
    You should download an IDE like eclipse/intellij. They will give you "error" information and let you know that something is wrong.
    In this case the IDE would of told you that you are missing a parameter and usually they have quick fix options which will auto fill to fix your issues.
    ▼▼▼ Click to checkout DarkScape a World PvP server in the works! ▼▼▼
    Attached image
    Reply With Quote  
     

  11. Thankful user:



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. [PI] Need help with my server compiler.
    By Kidz K0 in forum Help
    Replies: 7
    Last Post: 03-04-2011, 06:51 AM
  2. Need Help with compile error
    By dgoodwin13 in forum Help
    Replies: 10
    Last Post: 02-17-2009, 12:13 AM
  3. Need Help with compile error
    By dgoodwin13 in forum Help
    Replies: 20
    Last Post: 02-16-2009, 08:53 AM
  4. Need help, with 508 Servers.
    By l4m3r in forum Help
    Replies: 1
    Last Post: 02-05-2009, 11:08 PM
  5. I need help with compiling...
    By Keith in forum Help
    Replies: 10
    Last Post: 01-31-2009, 05:08 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •