Thread: What the fuck?

Results 1 to 2 of 2
  1. #1 What the fuck? 
    Banned

    Join Date
    Oct 2010
    Posts
    716
    Thanks given
    82
    Thanks received
    131
    Rep Power
    0
    Method:

    Code:
    		public static void sendBigMessage (String[] lines) {
    			for (int i=0;i<lines.length;i++) {
    				c.sendMessage(lines[i]);
    			}
    		}
    Usage:

    Code:
    if (playerCommand.startsWith("info")) {
    				server.content.MethodHub.sendBigMessage(new String[]
    				{"Server is currently @gre@BETA","To teleport use the Sailor or the Gnome Pilot!",
    				"These are the monsters that currently drop Ags, & Spirit Sheilds,","Dag Kings, Steal Drags, Iron Drags.",
    				"Dag Kings, Steal Drags, Iron Drags.","Steel drags are located at agility course, and 44s.",
    				"Iron drags, are located south of 44s way south level 33 and such.","Have Fun!"});
    			}
    Gives me;

    Code:
    [19-3-12 21:08]: java.lang.NullPointerException
    [19-3-12 21:08]: 	at server.content.MethodHub.sendBigMessage(MethodHub.java:19)
    [19-3-12 21:08]: 	at server.model.players.packets.Commands.processPacket(Commands.java:54)
    [19-3-12 21:08]: 	at server.model.players.PacketHandler.processPacket(PacketHandler.java:100)
    [19-3-12 21:08]: 	at server.model.players.Client.processQueuedPackets(Client.java:1107)
    [19-3-12 21:08]: 	at server.model.players.PlayerHandler.process(PlayerHandler.java:160)
    [19-3-12 21:08]: 	at server.Server.main(Server.java:154)
    Any help?

    Ps: The content package is one I added myself, does that have to do with it?
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    Why is it static if you're not defining Client c inside the method's parameters? If that class (MethodHub) creates an instance for every player then no need to make it static and make a way for a Client to get that class like

    private MethodHub methodHub = new MethodHub(this);
    public MethodHub getMethodHub() {
    return methodHub;
    }

    then

    if (playerCommand.equals("info")) {
    c.getMethodHub().sendBigMessage(new String[]
    {"Server is currently @gre@BETA","To teleport use the Sailor or the Gnome Pilot!",
    "These are the monsters that currently drop Ags, & Spirit Sheilds,","Dag Kings, Steal Drags, Iron Drags.",
    "Dag Kings, Steal Drags, Iron Drags.","Steel drags are located at agility course, and 44s.",
    "Iron drags, are located south of 44s way south level 33 and such.","Have Fun!"});
    }
    Reply With Quote  
     


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. Fuck shit cunt fuck balls!
    By Snow Cat123 in forum Help
    Replies: 11
    Last Post: 04-03-2010, 12:51 PM
  2. bombs cheat client fuck fuck fuck
    By atrix676 in forum Help
    Replies: 4
    Last Post: 07-15-2009, 06:20 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
  •