Thread: Need help!

Results 1 to 6 of 6
  1. #1 Need help! 
    Registered Member
    Join Date
    Jul 2015
    Posts
    35
    Thanks given
    5
    Thanks received
    3
    Rep Power
    11
    Ok, so... I'm working on my own achievements system & I've ran into a bit of trouble :/

    This is my code:
    Code:
    if (+monsterkill+ <= 100)
    			getPA().sendFrame126("@red@100 Monster kills", 29303);
    else if (+monsterkill+ == 100)
    getPA().sendFrame126("@gre@100 Monster kills", 29303);
    This is my error:
    Code:
    src\server\model\players\Client.java:1204: error: illegal start of expression
                            if (+monsterkill+ <= 100)
                                              ^
    src\server\model\players\Client.java:1206: error: illegal start of expression
    else if (+monsterkill+ == 100)
                           ^
    2 errors
    Press any key to continue . . .
    Any idea??
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Mar 2013
    Posts
    69
    Thanks given
    20
    Thanks received
    19
    Rep Power
    0
    Can you show how the Achievements are handled?
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Jul 2015
    Posts
    35
    Thanks given
    5
    Thanks received
    3
    Rep Power
    11
    Quote Originally Posted by Jashy View Post
    Can you show how the Achievements are handled?

    They're not handled at anyway, trying to reduce useless folders & having it all be held using a points system, for example, every iron ore I mine, I get a hidden point, that nobody can see, only shows in your playersave... And at 10 points, it will change the red text to green, meaning it's finished & I'm going to make it give a reward...
    I've never actually seen or head of an achievements system working this way...
    Reply With Quote  
     

  5. #4  
    Registered Member Paradox68's Avatar
    Join Date
    Jan 2012
    Age
    28
    Posts
    167
    Thanks given
    3
    Thanks received
    15
    Rep Power
    14
    if (monsterkill <= 100)
    getPA().sendFrame126("@red@100 Monster kills", 29303);
    else if (monsterkill == 100)
    getPA().sendFrame126("@gre@100 Monster kills", 29303);


    Just remove the + signs?
    REP me if I helped you, please! Much appreciated.
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Banned
    Join Date
    Mar 2013
    Posts
    69
    Thanks given
    20
    Thanks received
    19
    Rep Power
    0
    Like he said, this should fix it.

    [SPOIL]
    Quote Originally Posted by Paradox68 View Post
    if (monsterkill <= 100)
    getPA().sendFrame126("@red@100 Monster kills", 29303);
    else if (monsterkill == 100)
    getPA().sendFrame126("@gre@100 Monster kills", 29303);


    Just remove the + signs?
    [/SPOIL]

    Correct me if i'm wrong be either way, even if it works it won't stay green after 100 player kills because you made it only green when the kills = 100.
    Code:
    if (monsterkill >= 100)
    	getPA().sendFrame126("@gre@100 Monster kills", 29303);
    else if (monsterkill < 100)
    	getPA().sendFrame126("@red@100 Monster kills", 29303);
    Should do what you want it to do.

    Edit: Changed around the => to >= (My bad, I was rushing )
    Reply With Quote  
     

  8. Thankful user:


  9. #6  
    Registered Member
    Join Date
    Jul 2015
    Posts
    35
    Thanks given
    5
    Thanks received
    3
    Rep Power
    11
    Quote Originally Posted by Jashy View Post
    Like he said, this should fix it.

    [SPOIL][/SPOIL]

    Correct me if i'm wrong be either way, even if it works it won't stay green after 100 player kills because you made it only green when the kills = 100.

    Code:
    if (monsterkill => 100)
    	getPA().sendFrame126("@gre@100 Monster kills", 29303);
    else if (monsterkill < 100)
    	getPA().sendFrame126("@red@100 Monster kills", 29303);
    Should do what you want it to do.
    Yeah, I fixed it & I realised it wouldn't stay green at 100 after I looked at the finishing code aha
    Thanks for the help guys, much appreciated

    Quote Originally Posted by NamelessMan View Post
    Yeah, I fixed it & I realised it wouldn't stay green at 100 after I looked at the finishing code aha
    Thanks for the help guys, much appreciated
    Your code also gave me an error btw, you had one of the arrows infront of the =
    Code:
    if (monsterkill >= 100)
    	getPA().sendFrame126("@gre@100 Monster kills", 29303);
    else if (monsterkill <= 100)
    fixed it
    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. I need help
    By adolfo in forum Tutorials
    Replies: 0
    Last Post: 06-26-2007, 02:58 AM
  2. Need help
    By Saint in forum General
    Replies: 4
    Last Post: 05-20-2007, 02:03 AM
  3. Need help again
    By Zane in forum Showcase
    Replies: 4
    Last Post: 04-02-2007, 09:11 PM
  4. Need help choosing sig
    By Zane in forum Showcase
    Replies: 7
    Last Post: 04-02-2007, 03:14 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
  •