Can you show how the Achievements are handled?
|
Ok, so... I'm working on my own achievements system & I've ran into a bit of trouble :/
This is my code:
This is my error:Code:if (+monsterkill+ <= 100) getPA().sendFrame126("@red@100 Monster kills", 29303); else if (+monsterkill+ == 100) getPA().sendFrame126("@gre@100 Monster kills", 29303);
Any idea??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 . . .
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...
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?
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.
Should do what you want it to do.Code:if (monsterkill >= 100) getPA().sendFrame126("@gre@100 Monster kills", 29303); else if (monsterkill < 100) getPA().sendFrame126("@red@100 Monster kills", 29303);
Edit: Changed around the => to >= (My bad, I was rushing )
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 =
fixed itCode:if (monsterkill >= 100) getPA().sendFrame126("@gre@100 Monster kills", 29303); else if (monsterkill <= 100)
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |