bump
|
Im trying to make a cape heal a player when wearing every 10 seconds this is my code i add in playerassist.java
public static void healPlayer(Player client) {
Server.eventContainer.addEvent(new CycleEvent(10, true) {
public void execute() {
if (client.disconnected || client.playerEquipment[client.playerCape] != capeId) {
this.stop();
}
int heal = 120;
client.playerLevel[3] += heal;
client.getPA().refreshSkill(3);
}
});
}
This is the Errors I get
src\game\player\PlayerAssistant.java:128: error: constructor CycleEvent in class
CycleEvent cannot be applied to given types;
Server.eventContainer.addEvent(new CycleEvent(10, true) {
^
required: no arguments
found: int,boolean
reason: actual and formal argument lists differ in length
src\game\player\PlayerAssistant.java:128: error: <anonymous game.player.PlayerAs
sistant$1> is not abstract and does not override abstract method stop() in Cycle
Event
Server.eventContainer.addEvent(new CycleEvent(10, true) {
^
src\game\player\PlayerAssistant.java:130: error: local variable client is access
ed from within inner class; needs to be declared final
if (client.disconnected || client.playerEquipmen
t[client.playerCape] != 1052) {
^
src\game\player\PlayerAssistant.java:130: error: local variable client is access
ed from within inner class; needs to be declared final
if (client.disconnected || client.playerEquipmen
t[client.playerCape] != 1052) {
^
src\game\player\PlayerAssistant.java:130: error: local variable client is access
ed from within inner class; needs to be declared final
if (client.disconnected || client.playerEquipmen
t[client.playerCape] != 1052) {
^
src\game\player\PlayerAssistant.java:134: error: local variable client is access
ed from within inner class; needs to be declared final
client.playerLevel[3] += heal;
^
src\game\player\PlayerAssistant.java:135: error: local variable client is access
ed from within inner class; needs to be declared final
client.getPA().refreshSkill(3);
^
src\game\player\PlayerAssistant.java:128: error: cannot find symbol
Server.eventContainer.addEvent(new CycleEvent(10, true) {
^
symbol: variable eventContainer
location: class Server
8 errors
Press any key to continue . . .
NOTE I AM USING KRITHIUM SOURCE
bump
bump
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
Tags for this Thread |