Thread: Easy Conversion [rep++]

Page 1 of 3 123 LastLast
Results 1 to 10 of 27
  1. #1 Easy Conversion [rep++] 
    Registered Member
    G R A P E D's Avatar
    Join Date
    Feb 2009
    Age
    30
    Posts
    681
    Thanks given
    26
    Thanks received
    4
    Rep Power
    334
    Hello, I recently went from Delta to PI and I have been using my donator system on delta since then and it has been a success for me since.

    I need this converted to PI if it is possible, thanks.

    If it is possible, I need to have the points txt document configurable in the Data folder.

    Also, if anyone can include an easy donator system that would give the person donator with this command as well, I will rep.

    Code:
    if (command.startsWith("claim")) { 
                    
    String pin = command.substring(6);
    
    if (checkLog("points", pin) && (freeSlots()>1)) 
    {
    removepin("points",pin);
    if (checkLog("points", pin)) {
    return;
    }
    donorPoints += 5;
    donator = 1;
    writeLog(""+playerName+" claimed 5 Donator Points with Pin: "+pin, "rewards");
    disconnected = true;
    }
    else
    {
    sM("An error has occurred, please try again.");
    	}
    }

    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2009
    Age
    27
    Posts
    2,768
    Thanks given
    367
    Thanks received
    187
    Rep Power
    458
    Code:
    if (playerCommand.equalsIgnoreCase("claim")) { 
                    
    String pin = command.substring(6);
    
    if (checkLog("points", pin) && (freeSlots()>1)) 
    {
    removepin("points",pin);
    if (checkLog("points", pin)) {
    return;
    }
    c.donorPoints += 5;
    c.donator = 1;
    writeLog(""+playerName+" claimed 5 Donator Points with Pin: "+pin, "rewards"); //idk about this, this goes in your Cmd box?
    disconnected = true;
    }
    else
    {
    c.sendMessage("An error has occurred, please try again.");
    	}
    }
    if anyone errors post (im sure there should be 1-3, i just want to see them)
    Reply With Quote  
     

  3. #3  
    Registered Member
    G R A P E D's Avatar
    Join Date
    Feb 2009
    Age
    30
    Posts
    681
    Thanks given
    26
    Thanks received
    4
    Rep Power
    334
    10 Errors total.

    Code:
    src\server\model\players\packets\Commands.java:50: cannot find symbol
    symbol  : variable command
    location: class server.model.players.packets.Commands
    String pin = command.substring(6);
                 ^
    src\server\model\players\packets\Commands.java:52: cannot find symbol
    symbol  : method checkLog(java.lang.String,java.lang.String)
    location: class server.model.players.packets.Commands
    if (checkLog("points", pin) && (freeSlots()>1))
        ^
    src\server\model\players\packets\Commands.java:52: cannot find symbol
    symbol  : method freeSlots()
    location: class server.model.players.packets.Commands
    if (checkLog("points", pin) && (freeSlots()>1))
                                    ^
    src\server\model\players\packets\Commands.java:54: cannot find symbol
    symbol  : method removepin(java.lang.String,java.lang.String)
    location: class server.model.players.packets.Commands
    removepin("points",pin);
    ^
    src\server\model\players\packets\Commands.java:55: cannot find symbol
    symbol  : method checkLog(java.lang.String,java.lang.String)
    location: class server.model.players.packets.Commands
    if (checkLog("points", pin)) {
        ^
    src\server\model\players\packets\Commands.java:58: cannot find symbol
    symbol  : variable donorPoints
    location: class server.model.players.Client
    c.donorPoints += 5;
     ^
    src\server\model\players\packets\Commands.java:59: cannot find symbol
    symbol  : variable donator
    location: class server.model.players.Client
    c.donator = 1;
     ^
    src\server\model\players\packets\Commands.java:60: cannot find symbol
    symbol  : variable playerName
    location: class server.model.players.packets.Commands
    writeLog(""+playerName+" claimed 5 Donator Points with Pin: "+pin, "rewards"); /
    /idk about this, this goes in your Cmd box?
                ^
    src\server\model\players\packets\Commands.java:60: cannot find symbol
    symbol  : method writeLog(java.lang.String,java.lang.String)
    location: class server.model.players.packets.Commands
    writeLog(""+playerName+" claimed 5 Donator Points with Pin: "+pin, "rewards"); /
    /idk about this, this goes in your Cmd box?
    ^
    src\server\model\players\packets\Commands.java:61: cannot find symbol
    symbol  : variable disconnected
    location: class server.model.players.packets.Commands
    disconnected = true;
    ^

    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2010
    Age
    29
    Posts
    891
    Thanks given
    22
    Thanks received
    47
    Rep Power
    0
    EDIT: sorry mod remove this post
    hi
    Reply With Quote  
     

  5. #5  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Quote Originally Posted by Mr Nick x D View Post
    Code:
    if (playerCommand.equalsIgnoreCase("claim")) { 
                    
    String pin = command.substring(6);
    
    if (checkLog("points", pin) && (freeSlots()>1)) 
    {
    removepin("points",pin);
    if (checkLog("points", pin)) {
    return;
    }
    c.donorPoints += 5;
    c.donator = 1;
    writeLog(""+playerName+" claimed 5 Donator Points with Pin: "+pin, "rewards"); //idk about this, this goes in your Cmd box?
    disconnected = true;
    }
    else
    {
    c.sendMessage("An error has occurred, please try again.");
    	}
    }
    if anyone errors post (im sure there should be 1-3, i just want to see them)
    Only thing you changed was SM to sendmessage lol
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Sep 2009
    Age
    27
    Posts
    2,768
    Thanks given
    367
    Thanks received
    187
    Rep Power
    458
    do you even have the donator rank in your pi?

    like in player java, Public int donator;

    and Public int donorPoints;


    Quote Originally Posted by Harlan View Post
    Only thing you changed was SM to sendmessage lol
    i was just trying to help, i'm not experinced in java, and i did a few other things but yeah.
    Reply With Quote  
     

  7. #7  
    Registered Member
    G R A P E D's Avatar
    Join Date
    Feb 2009
    Age
    30
    Posts
    681
    Thanks given
    26
    Thanks received
    4
    Rep Power
    334
    No, I don't have one.

    Reply With Quote  
     

  8. #8  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Code:
    if (playerCommand.equalsIgnoreCase("claim")) {
    			try {
                    String pin = playerCommand.substring(6);
    //add the method checkLog(String points, int pin)		if (checkLog("points", pin) && (c.getItems().freeSlots()>1))  {
    //add the method removepin(String points, int pin)			removepin("points",pin);
    		//		if (checkLog("points", pin)) 
    		//			return;
    		//		}
    				c.donorPoints += 5;
    				c.donator = 1;
    //add the method writeLog(String write, String rewards) writeLog(""+playerName+" claimed 5 Donator Points with Pin: "+pin, "rewards"); //idk about this, this goes in your Cmd box?
    				c.disconnected = true;
    			} catch (Exception e) {
    					c.sendMessage("Player Must Be Offline.");
    				}
    			}
    Reply With Quote  
     

  9. #9  
    Registered Member
    G R A P E D's Avatar
    Join Date
    Feb 2009
    Age
    30
    Posts
    681
    Thanks given
    26
    Thanks received
    4
    Rep Power
    334
    I added isDonator and donorPoints.

    Harlan, you commented out basically the whole code.

    Reply With Quote  
     

  10. #10  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Quote Originally Posted by Mr Ramrod View Post
    I added isDonator and donorPoints.

    Harlan, you commented out basically the whole code.
    That's because you can't call methods that don't exist which is basically your whole command
    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. Int conversion
    By Sillhouette in forum Requests
    Replies: 5
    Last Post: 06-04-2011, 06:29 PM
  2. 459 PJA --> 317 PJA - Conversion
    By Gaylord in forum Requests
    Replies: 7
    Last Post: 06-12-2010, 06:23 PM
  3. conversion help
    By Gary in forum Requests
    Replies: 0
    Last Post: 03-24-2010, 12:01 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
  •