Thread: sendFrame126 not working for certain urls?

Results 1 to 4 of 4
  1. #1 sendFrame126 not working for certain urls? 
    Registered Member
    Join Date
    Jan 2014
    Posts
    68
    Thanks given
    2
    Thanks received
    2
    Rep Power
    11
    I'm having a problem, when I use my ::vote or ::forums the links won't open.

    I believe it has to do with not having www. before the url as my :onate works.

    I can't use www. before my other links so how can i get around this?

    This doesn't work

    Code:
    	VOTE {
    		@Override
    		public void execute(Player c, String input) {
    			c.getPA().sendFrame126("name.motivoters.com/motivote/", 12000);
    		}
    	},
    This does
    Code:
    	DONATE {
    		@Override
    		public void execute(Player c, String input) {
    			c.getPA().sendFrame126("www.rsps-pay.com/store.php?id=", 12000);
    		}
    	},
    Reply With Quote  
     

  2. #2  
    What is a Java?

    Leon.'s Avatar
    Join Date
    Oct 2013
    Posts
    1,919
    Thanks given
    173
    Thanks received
    802
    Rep Power
    5000
    send http:// before the url?

    Attached image
    Attached image

    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2014
    Posts
    68
    Thanks given
    2
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by Leon X D View Post
    send http:// before the url?
    Not working :/
    Reply With Quote  
     

  4. #4  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    I just had a look at my client and if yours is similar, you'll need a small modification.
    This is code in my PacketHandler where packets are handled (126: setInterfaceText in particular):
    Code:
    case 126: //Set Interface Text
        String text = packetInStream.getString();
        interfaceId = packetInStream.getShortA();
        if (text.startsWith("www.")) {
            clnt.launchURL(text);
            packetType = -1;
            return true;
        }
        GameInterface.interfaceCache[interfaceId].disabledText = text;
        packetType = -1;
        return true;
    As you can see, it only launches the url when it starts with "www.".
    If you link doesn't work with "www." in a browser, then I suggest adding the "http://" to the if-statement as well:
    Code:
    if (text.startsWith("www.") || text.startsWith("http://"))
    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. Client not working for You? READ!
    By Edge in forum Tutorials
    Replies: 59
    Last Post: 02-06-2020, 09:27 AM
  2. 562 Compiler Not Working For Me??
    By ILoveCookiez in forum Help
    Replies: 1
    Last Post: 04-04-2010, 11:31 AM
  3. Hd Not Working For 508 Servers...
    By Delifed in forum Help
    Replies: 0
    Last Post: 11-26-2009, 02:50 AM
  4. Edit will not work for me D:
    By iPhoneGuy in forum Complaints
    Replies: 10
    Last Post: 11-08-2009, 06:59 PM
  5. clan chat not working for me
    By devildreams54 in forum Help
    Replies: 5
    Last Post: 07-09-2009, 08:48 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
  •