Thread: [PI] My point system doesn't save? [PI]

Results 1 to 8 of 8
  1. #1 [PI] My point system doesn't save? [PI] 
    Registered Member
    Join Date
    Sep 2010
    Posts
    87
    Thanks given
    1
    Thanks received
    2
    Rep Power
    1
    Can someone assist me please, my point system isnt saving.. This is PI btw.

    Code:
    					} else if (token.equals("skilling-points")) {
    						p.skillingPoints = Integer.parseInt(token2);
    Code:
    			characterfile.write("skilling-points = ", 0, 12);
    			characterfile.write(Integer.toString(p.skillingPoints), 0, Integer.toString(p.skillingPoints).length());
    			characterfile.newLine();
    Code:
    					if (c.getItems().playerHasItem(390, 30)) { //noted manta
    				for (int j = 0; j < Server.playerHandler.players.length; j++) {
    						if (c.getItems().playerHasItem(390,30)) {
    							c.sendMessage("You recieve 5 skilling points for your donation to the portal.");
    							c.getItems().deleteItem(390,c.getItems().getItemSlot(390), 30);
    							c.skillingPoints += 5;
    							c.getPA().removeAllWindows();
    						}
    					}
    				}

    That is my coding in a short term kinda thing.. Can anyone tell me why when you relog it will delete all your skillingPoints?
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    May 2009
    Posts
    1,443
    Thanks given
    653
    Thanks received
    526
    Rep Power
    310
    Code:
    characterfile.write("skilling-points = ", 0, 12);
    changes to:

    Code:
    characterfile.write("skilling-points = ", 0, 18);
    the difference between the 12 and the 19 is that in the 12 it's telling the server where to write the interger but the way you have it set up it's telling it right between the name, the 19 it puts it at the end
    Retired from RSPS development 2008-2018
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Sep 2010
    Posts
    87
    Thanks given
    1
    Thanks received
    2
    Rep Power
    1
    Quote Originally Posted by -Fanz- View Post
    Code:
    characterfile.write("skilling-points = ", 0, 12);
    changes to:

    Code:
    characterfile.write("skilling-points = ", 0, 18);
    the difference between the 12 and the 19 is that in the 12 it's telling the server where to write the interger but the way you have it set up it's telling it right between the name, the 19 it puts it at the end
    no, in-fact you just f***ed up so much stuff I had and it reset like 20 players.
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Oct 2010
    Posts
    717
    Thanks given
    82
    Thanks received
    131
    Rep Power
    0
    Quote Originally Posted by jake3393 View Post
    no, in-fact you just f***ed up so much stuff I had and it reset like 20 players.
    Hey shut the fuck up, hes trying to help you, you should be gratefull leeching fuck.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Sep 2010
    Posts
    87
    Thanks given
    1
    Thanks received
    2
    Rep Power
    1
    Quote Originally Posted by Arno View Post
    Hey shut the fuck up, hes trying to help you, you should be gratefull leeching fuck.
    Help me by making half of my players reset and not save? And why am I a leecher because I use PI? lol. Thats funny you need to calm down man... If he was trying to help he would give me real help or not say anything at all. But never assume when giving help.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Nov 2008
    Posts
    58
    Thanks given
    0
    Thanks received
    0
    Rep Power
    20
    Quote Originally Posted by jake3393 View Post
    no, in-fact you just f***ed up so much stuff I had and it reset like 20 players.
    Well actually what he said is true you fucktard.
    You are clearly a failure because you don't even know that the number at the end of the 'write' method is the LENGTH of the String (Characters+spaces) that you're trying to write.

    You are, at the moment, telling it to write a String of length 18 but telling the method that is of length 12; which causes it to screw up and not write properly. Maybe you should sit down and learn the basics a little before applying updates straight onto a live server before you even know whether it works or not. It's your fault.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Division's Avatar
    Join Date
    Dec 2009
    Age
    26
    Posts
    2,208
    Thanks given
    41
    Thanks received
    78
    Rep Power
    97
    Quote Originally Posted by LanScape View Post
    Well actually what he said is true you fucktard.
    You are clearly a failure because you don't even know that the number at the end of the 'write' method is the LENGTH of the String (Characters+spaces) that you're trying to write.

    You are, at the moment, telling it to write a String of length 18 but telling the method that is of length 12; which causes it to screw up and not write properly. Maybe you should sit down and learn the basics a little before applying updates straight onto a live server before you even know whether it works or not. It's your fault.
    Yes lol, 12 is wrong, it wont finish the line for saving the points.
    Learn to listen to others.
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Sep 2010
    Posts
    844
    Thanks given
    7
    Thanks received
    30
    Rep Power
    108
    Hey, F*** you all if were cursing.
    Real Eyes
    Realize
    Real Lies
    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. Replies: 3
    Last Post: 02-25-2013, 02:26 AM
  2. Better PK Point system.
    By Spooky in forum Snippets
    Replies: 22
    Last Post: 12-23-2012, 07:01 AM
  3. [BS] a better PK POINT system.
    By ZRPS in forum Tutorials
    Replies: 4
    Last Post: 02-02-2010, 12:45 AM
  4. Help with pk point system
    By Pitx in forum Help
    Replies: 0
    Last Post: 08-20-2009, 08:34 PM
  5. Pk point system.
    By munch in forum Help
    Replies: 10
    Last Post: 08-15-2009, 04:41 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •