Thread: [PI] PKP System

Results 1 to 5 of 5
  1. #1 [PI] PKP System 
    Registered Member
    Join Date
    Sep 2010
    Posts
    122
    Thanks given
    2
    Thanks received
    0
    Rep Power
    21
    How can i make this work, im using pi. Basicly im trying so it gives u random pkp each time u kill someone.



    Code:
    				int random = 2+misc.random(3);
    					if(random == 0)
    						o.pkpoints += 30;
    						o.sendMessage ("You get 30 Pk points. You have now "+o.pkpoints+".");
    					if(random == 1)
    						o.pkpoints += 40;
    						o.sendMessage ("You get 40 Pk points. You have now "+o.pkpoints+".");
    					if(random == 2)
    						o.pkpoints += 50;
    						o.sendMessage ("You get 50 Pk points. You have now "+o.pkpoints+".");
    					if(random == 3)
    						o.pkpoints += 60;
    						o.sendMessage ("You get 60 Pk points. You have now "+o.pkpoints+".");
    					if(random == 4)
    						o.pkpoints += 80;
    						o.sendMessage ("You get 80 Pk points. You have now "+o.pkpoints+".");
    					if(random == 5)
    						o.pkpoints += 100;
    						o.sendMessage ("You get 100 Pk points. You have now "+o.pkpoints+".");


    This is the errors i get
    Code:
    src\server\model\players\PlayerAssistant.java:941: cannot find symbol
    symbol  : variable misc
    location: class server.model.players.PlayerAssistant
                                    int random = 2+misc.random(3);
                                                   ^
    src\server\model\players\PlayerAssistant.java:941: operator + cannot be applied
    to int,misc.random
                                    int random = 2+misc.random(3);
                                                 ^
    src\server\model\players\PlayerAssistant.java:941: incompatible types
    found   : <nulltype>
    required: int
                                    int random = 2+misc.random(3);
                                                  ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    3 errors
    Press any key to continue . . .
    Reply With Quote  
     

  2. #2  
    Registered Member Satan666's Avatar
    Join Date
    May 2010
    Posts
    449
    Thanks given
    65
    Thanks received
    100
    Rep Power
    15
    try
    Code:
    int random == (Misc.random(3)+2);
    not sure tho ;]
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Sep 2009
    Posts
    3,247
    Thanks given
    195
    Thanks received
    255
    Rep Power
    0
    Code:
    c.
    Code:
    c.getPA().
    Code:
    p.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2010
    Age
    24
    Posts
    2,530
    Thanks given
    544
    Thanks received
    584
    Rep Power
    411
    import server.util.Misc;
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Sep 2010
    Posts
    122
    Thanks given
    2
    Thanks received
    0
    Rep Power
    21
    kk got it working thanks guys
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •