Thread: ::topic (opening forum topic)

Results 1 to 6 of 6
  1. #1 ::topic (opening forum topic) 
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    672
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    I have this

    Code:
    		if (wholeCommand.equalsIgnoreCase("topic")) {
    			try {
    				int id = Integer.parseInt(command[1]);
    			    player.getPacketSender().sendString(1, "http://misthalinpk.com/forum/index.php?/topic/" + id + "-");
    			    return;
    			} catch (NumberFormatException e) {
    			    player.getPacketSender().sendMessage("::topic ID");
    			}
    			return;
    		}
    I've been working on it but cant seem to get it to work..
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Dec 2014
    Posts
    435
    Thanks given
    18
    Thanks received
    35
    Rep Power
    11
    The command looks like its only ::topic, not ::topic int


    OSRS Pure
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    672
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    Quote Originally Posted by Audi View Post
    The command looks like its only ::topic, not ::topic int
    Yeah but for example here is another with int

    Code:
    		if (command[0].equals("interface")) {
    			int id = Integer.parseInt(command[1]);
    			player.getPacketSender().sendInterface(id);
    		}
    Example of URL command

    Code:
    		if (command[0].equals("vote")) {
    			player.getPacketSender().sendString(1, "http://-------/voteforus/");
    			player.getPacketSender().sendMessage("Opening voting URL, thank you for voting.");
    		}
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Dec 2014
    Posts
    435
    Thanks given
    18
    Thanks received
    35
    Rep Power
    11
    Quote Originally Posted by Jc6689 View Post
    Yeah but for example here is another with int

    Code:
    		if (command[0].equals("interface")) {
    			int id = Integer.parseInt(command[1]);
    			player.getPacketSender().sendInterface(id);
    		}
    Example of URL command

    Code:
    		if (command[0].equals("vote")) {
    			player.getPacketSender().sendString(1, "http://-------/voteforus/");
    			player.getPacketSender().sendMessage("Opening voting URL, thank you for voting.");
    		}
    yes that command has something replacing 0 for 1 which 1 for the topic would be the id, why not use that command instead of the other?


    OSRS Pure
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Community Veteran


    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,833
    Thanks given
    187
    Thanks received
    306
    Discord
    View profile
    Rep Power
    770
    Code:
    					if (command[0].equalsIgnoreCase("topic")) {
    			try {
    				int id = Integer.parseInt(command[1]);
    			    player.getPacketSender().sendString(1, "http://misthalinpk.com/forum/index.php?/topic/" + id + "-");
    			    return;
    			} catch (NumberFormatException e) {
    			    player.getPacketSender().sendMessage("::topic ID");
    			}
    		}


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

  6. Thankful user:


  7. #6  
    Jake from State Farm

    FKN Jake's Avatar
    Join Date
    Nov 2013
    Posts
    672
    Thanks given
    45
    Thanks received
    58
    Rep Power
    153
    Quote Originally Posted by arch337 View Post
    Code:
    					if (command[0].equalsIgnoreCase("topic")) {
    			try {
    				int id = Integer.parseInt(command[1]);
    			    player.getPacketSender().sendString(1, "http://misthalinpk.com/forum/index.php?/topic/" + id + "-");
    			    return;
    			} catch (NumberFormatException e) {
    			    player.getPacketSender().sendMessage("::topic ID");
    			}
    		}
    Thank you, it didn't occur to me that equalsignorecase and cammand0ignorescase were different in this instance, repped.
    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. Recent topics posted on homepage (IPB forums)
    By IronWedge in forum Application Development
    Replies: 7
    Last Post: 06-07-2015, 01:51 AM
  2. [Release]Open Forum DEV4
    By #Trilla in forum Website Development
    Replies: 29
    Last Post: 01-11-2012, 11:42 AM
  3. [PROJECT] Open Forum Framewerk
    By #Trilla in forum Website Development
    Replies: 27
    Last Post: 12-10-2011, 08:52 PM
  4. More of my sigs (Other Topic got full)
    By Aces in forum Showcase
    Replies: 12
    Last Post: 04-04-2007, 03:38 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
  •