Free Games Forum
Free Games Games Forums Music Forums TV Forums

  Free Games Forum Home FORUM
HOME
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN
Rules & FAQ RULES / FAQ
REPORT SPAM

Free Games Forum: Game Technology: Javascript Coding:
Will anyone help me with this error?

 

 


Mr Vision
Newbie


Apr 9, 2005, 7:33 PM

Post #1 of 1 (401 views)
Shortcut
Will anyone help me with this error? Can't Post

I have a problem when compiling this script and i was wondering if anyone can help me with it...the following will be the error, followed directly by the script

Parsing Input...
Compiling...
Standard Output from javac:

/tmp/22214/MegaIron.java:109: 'class' or 'interface' expected
public void AnvilToBank()
^
1 error



public class MegaIron extends Script
{
public MegaIron(mudclient rs)
{
super(rs);
}
public String[] getCommands()
{
return new String[]{"ironmss"};
}

public void MegaIron()
{
while (InvCount(151) > 0)
{
UseOnObject(310, 546, FindInv(151));
Wait(2500);
}
}
public void BankIt()
{
while (!Bank() && Running())
{
while (!QuestMenu() && Running())
{
int BankerID = GetNearestNPC(95);
TalkToNPC(BankerID);
long Time = System.currentTimeMillis();
while (System.currentTimeMillis() - Time <= 2000 && !QuestMenu() && Running())
Wait(1);
}
Answer(0);
long Time = System.currentTimeMillis();
while (System.currentTimeMillis() - Time <= 5000 && !Bank() && Running())
Wait(1);
}
while (InvCount(170) > 0)
{
Deposit(170,1);
Wait(100);
}
while (InvCount(157) > 0)
{
Deposit(157,1);
Wait(100);
}
while (InvCount(158) > 0)
{
Deposit(158,1);
Wait(100);
}
while (InvCount(159) > 0)
{
Deposit(159,1);
Wait(100);
}
while (InvCount(160) > 0)
{
Deposit(160,1);
Wait(100);
}

CloseBank();

}
public void RimmingtonToFurnace()
{
Walk(312,628);
Walk(311,619);
Walk(309,613);
Walk(307,605);
Walk(303,598);
Walk(298,589);
Walk(292,582);
Walk(290,573);
Walk(291,564);
Walk(293,556);
Walk(299,551);
Walk(303,544);
Walk(309,542);
while (ObjectAt(309,543) == 2)
{
OpenDoor(309,543,0);
Wait(200);
WalkNoWait(307, 545);
}
Walk(307,545);
}
public void FunaceToAnvil()
{
while (ObjectAt(309,543) == 2)
{
OpenDoor(309,543,0);
Wait(200);
}
Walk(307,545);
Walk(315,515);
Walk(315,553);
Walk(321,498);
Walk(327,491);
while (ObjectAt(327,490) == 64)
{
AtObject(327,490);
Wait(300);
}
Walk(315,508);
}
}
public void AnvilToBank()
{
while (ObjectAt(325,493) == 2)
{
OpenDoor(325,493,0);
Wait(200);
}
Walk(316,502);
Walk(314,517);
Walk(314,533);
Walk(300,546);
Walk(291,562);
Walk(286,571);
}
public void BankToRimmington()
{
Walk(286,571);
while (ObjectAt(287,571) == 64)
{
AtObject(287,571);
Wait(300);
}
Walk(287,572);
Walk(291,581);
Walk(297,588);
Walk(304,591);
Walk(305,599);
Walk(307,606);
Walk(303,614);
Walk(301,622);
Walk(307,628);
Walk(309,636);
Walk(317,641);
}
public void MineRimmingtonIron()
{
int IronLoc[] = GetNearestObject(102);
if (IronLoc[1] < 643 && IronLoc[1] != -1 && IronLoc[0] != -1)
{
AtObject(IronLoc[0],IronLoc[1]);
Wait(1000);
}
}
public void SleepIfOver(int FatLVL)
{
if (Fatigue() > FatLVL && Running())
{
while (!Sleeping() && Running())
{
Use(FindInv(1263));
Wait(2000);
}
while (Sleeping() && Running())
{
System.out.print("\007"); System.out.flush();
Wait(700);
}
}
}
public void start(String command, String parameter[])
{
int OreCount = 0;
int BarCount = 0;
int DiamondCount = 0;
int RubyCount = 0;
int EmeraldCount = 0;
int SapphireCount = 0;
int TripCount = 0;
int SleepCount = 0;
int FatigueSum = 0;
int FatigueStart = 0;
int FatigueDifference = 0;
int FatLVL = 0;
double MiningEXP = 0;
int MiningDifference = 0;
int MiningStart = 0;
int SmithingStart = 0;
int SmithingDifference = 0;
double SmithingEXP = 0;
DisplayMessage("@bla@Falador Iron Miner, Smelter, and Smither",3);
DisplayMessage("@gre@By: Vision Ex",3);
while (Running())
{
FatigueStart = Fatigue();
while (InvCount() < 30 && Running())
{
MineRimmingtonIron();
}
OreCount = InvCount(151) + OreCount;
MiningEXP = OreCount * 35;
if (Running())
RimmingtonToFurnace();
if (Running())
SmeltIron();
BarCount = InvCount(170) + BarCount;
SmithingEXP = BarCount * 12.5;
if (Running())
FurnaceToAnvil();
SmithIron();
while (Running() == true && InvCount(28) < 27)
{
UseOnObject(327,490,1);
Wait(1000);

for(; !QuestMenu(); Wait(10));
Answer(1);
for(; !QuestMenu(); Wait(10));
Answer(1);
for(; !QuestMenu(); Wait(10));
Answer(1);
Wait(1000);
}

if(Fatigue() > 90 && Running() == true)
{
while (Sleeping() == false)
{
Use(FindInv(1263));
Wait(3000);
}

while (Sleeping() == true)
{
Wait(200);



Thats it, I hope someone can show me the error, by either fixing it and sending it to me at jakesmith387@hotmail.com, or by reposting it, fixed...maybe even just giving me a chunk of it to replace with the chunk thats errored...

Please Help,
Vision Ex




Mess with the best...die like the rest.


 
 
 


Search for (options) Web Design by Web Ideas - Page loaded in: 0.10 s on (CGI/1.1)