Thread: [PI] Vote 4 Cash doesn't read spaces

Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1 [PI] Vote 4 Cash doesn't read spaces 
    Registered Member sketzo's Avatar
    Join Date
    Jul 2006
    Age
    32
    Posts
    424
    Thanks given
    19
    Thanks received
    15
    Rep Power
    34
    So.. when people vote on my vote4cash site with case sensitive
    e.g. TeStLalA

    then in sql database it goes to : testlala - it's not case sensitive anymore and people won't retrieve cash that way.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Sep 2010
    Posts
    883
    Thanks given
    20
    Thanks received
    6
    Rep Power
    0
    got the same problem :c
    Reply With Quote  
     

  3. #3  
    Registered Member sketzo's Avatar
    Join Date
    Jul 2006
    Age
    32
    Posts
    424
    Thanks given
    19
    Thanks received
    15
    Rep Power
    34
    Anyway i fixed this but got another problem

    If player votes in my vote page and his username for example is "pro killer" then he won't retrieve any cash ingame.. Because his name has space...
    Code:
    public static boolean checkVotes(String playerName) {
    	try {
    		URL url = new URL("http://mydomainishere/vote.php?type=checkvote&username="+playerName);
    		BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
    		String results = reader.readLine();
    		if(results.length() > 0) {
    			if(results.equals("user needs reward..."))
    				return true;
    			else 
    				return false;
    		}
    	} catch (MalformedURLException e) {
    		System.out.println("Malformed URL Exception in checkVotes(String playerName)");
    	} catch (IOException e) {
    		System.out.println("IO Exception in checkVotes(String playerName)");
    	}
    	return false;
    }
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Sep 2010
    Posts
    883
    Thanks given
    20
    Thanks received
    6
    Rep Power
    0
    try and change ''+playerName);''

    to:

    ''+username);''
    Reply With Quote  
     

  5. #5  
    Registered Member sketzo's Avatar
    Join Date
    Jul 2006
    Age
    32
    Posts
    424
    Thanks given
    19
    Thanks received
    15
    Rep Power
    34
    //That +playerName is from string.. so no..
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Sep 2010
    Posts
    883
    Thanks given
    20
    Thanks received
    6
    Rep Power
    0
    so make that username as well
    Reply With Quote  
     

  7. #7  
    Registered Member sketzo's Avatar
    Join Date
    Jul 2006
    Age
    32
    Posts
    424
    Thanks given
    19
    Thanks received
    15
    Rep Power
    34
    If the name doesn't have space and the vote works for them, then it the string doesn't have to be usrname.. It reads username fine but not with spaces.
    Reply With Quote  
     

  8. #8  
    Registered Member walid's Avatar
    Join Date
    Nov 2008
    Posts
    379
    Thanks given
    6
    Thanks received
    8
    Rep Power
    3
    Tell your users to use _ as a space, like this here
    Reply With Quote  
     

  9. #9  
    Banned
    Join Date
    Sep 2010
    Posts
    883
    Thanks given
    20
    Thanks received
    6
    Rep Power
    0
    Quote Originally Posted by walid View Post
    Tell your users to use _ as a space, like this here
    thats a cheap solution, it should be possible to fix a proper way..
    Reply With Quote  
     

  10. #10  
    Registered Member sketzo's Avatar
    Join Date
    Jul 2006
    Age
    32
    Posts
    424
    Thanks given
    19
    Thanks received
    15
    Rep Power
    34
    That "cheap solution" doesn't work.
    Reply With Quote  
     

Page 1 of 3 123 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. Replies: 5
    Last Post: 11-10-2010, 08:05 PM
  2. Replies: 9
    Last Post: 12-24-2009, 11:13 PM
  3. Usernames Case-Sensitive
    By Flamefire in forum Help
    Replies: 2
    Last Post: 04-13-2009, 07:02 AM
  4. Replies: 3
    Last Post: 02-16-2009, 06:25 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
  •