-3

I'm getting an illegal start of expression error for the below code.

this.runTime = System.currentTimeMillis();
this.timeRan = this.runTime - this.startTime;
int XPH = (int)(this.gainedXP * 3600000.0D / timeRan);
long TimeTNL = () (Skills.getXPToNextLevel("Mining") * 3600000.0D / XPH);
if (XPH > 0) {
  this.TNLhours = (TimeTNL / 3600000L);
  TimeTNL -= this.TNLhours * 3600000L;
  this.TNLminutes = (TimeTNL / 60000L);
  TimeTNL -= this.TNLminutes * 60000L;
  this.TNLseconds = (TimeTNL / 1000L);
  TimeTNL -= this.TNLseconds * 1000L;
}

This is the error:

long TimeTNL = () (Skills.getXPToNextLevel("Mining") * 3600000.0D / XPH);
                ^
Illegal start of expression error  

When I remove the (), I get 100 errors:

  RSTile[] FWpathWallToBank = { new RSTile(2944, 3367), new RSTile(2945,
;
  ^
aMinerFree.java:127: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] ABankToOres = { new RSTile(2653, 3284), new RSTile(2663, 3292)
  ^
aMinerFree.java:132: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] ABankToIron = { new RSTile(2653, 3284), new RSTile(2663, 3292)
  ^
aMinerFree.java:137: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] AOresToBank = { new RSTile(2704, 3330), new RSTile(2698, 3321)
  ^
aMinerFree.java:142: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] MGpathToLadder = { new RSTile(3044, 9738), new RSTile(3037, 97
  ^
aMinerFree.java:145: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] MGpathToBank = { new RSTile(3020, 3340), new RSTile(3023, 3351
  ^
aMinerFree.java:148: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] VWtoBank = { new RSTile(3179, 3368), new RSTile(3174, 3377),
  ^
aMinerFree.java:153: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] VWtoOres = { new RSTile(3184, 3436), new RSTile(3180, 3429),
  ^
aMinerFree.java:158: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] VEtoBank = { new RSTile(3285, 3366), new RSTile(3291, 3376),
  ^
aMinerFree.java:164: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] VEtoOres = { new RSTile(3254, 3421), new RSTile(3264, 3428),
  ^
aMinerFree.java:170: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] ToAubury = { new RSTile(3253, 3401) };
  ^
aMinerFree.java:172: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] ToDoor = { new RSTile(3253, 3397) };
  ^
aMinerFree.java:174: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] EssToBank = { new RSTile(3254, 3397), new RSTile(3259, 3409),
  ^
aMinerFree.java:177: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] Essence1 = { new RSTile(2904, 4840), new RSTile(2896, 4846) };
  ^
aMinerFree.java:179: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] Essence2 = { new RSTile(2918, 4839), new RSTile(2926, 4846) };
  ^
aMinerFree.java:181: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] Essence3 = { new RSTile(2918, 4823), new RSTile(2925, 4817) };
  ^
aMinerFree.java:183: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile[] Essence4 = { new RSTile(2903, 4823), new RSTile(2897, 4818) };
  ^
aMinerFree.java:185: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk1 = new RSTile(3030, 9740);
  ^
aMinerFree.java:186: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk2 = new RSTile(3030, 9737);
  ^
aMinerFree.java:187: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk3 = new RSTile(3030, 9735);
  ^
aMinerFree.java:189: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk4 = new RSTile(3035, 9735);
  ^
aMinerFree.java:190: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk5 = new RSTile(3036, 9738);
  ^
aMinerFree.java:191: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk6 = new RSTile(3037, 9741);
  ^
aMinerFree.java:193: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk7 = new RSTile(3041, 9740);
  ^
aMinerFree.java:194: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk8 = new RSTile(3041, 9737);
  ^
aMinerFree.java:195: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk9 = new RSTile(3039, 9734);
  ^
aMinerFree.java:197: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk10 = new RSTile(3044, 9734);
  ^
aMinerFree.java:198: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk11 = new RSTile(3046, 9738);
  ^
aMinerFree.java:199: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk12 = new RSTile(3046, 9742);
  ^
aMinerFree.java:201: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk13 = new RSTile(3051, 9741);
  ^
aMinerFree.java:202: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk14 = new RSTile(3051, 9737);
  ^
aMinerFree.java:203: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile randomwalk15 = new RSTile(3048, 9735);
  ^
aMinerFree.java:205: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile BankPos = new RSTile(3014, 3356);
  ^
aMinerFree.java:206: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile BankPos1 = new RSTile(3026, 3349);
  ^
aMinerFree.java:207: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile coalPos = new RSTile(3035, 9737);
  ^
aMinerFree.java:208: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile ladderpos1 = new RSTile(3022, 9739);
  ^
aMinerFree.java:209: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile ladderpos2 = new RSTile(3018, 3341);
  ^
aMinerFree.java:210: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile checkpoint = new RSTile(3030, 3341);
  ^
aMinerFree.java:211: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile checkpoint1 = new RSTile(3030, 3347);
  ^
aMinerFree.java:212: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile Bankcheck = new RSTile(3026, 3350);
  ^
aMinerFree.java:213: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile coalPos1 = new RSTile(3034, 9738);
  ^
aMinerFree.java:214: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile checkpoint2 = new RSTile(3019, 3359);
  ^
aMinerFree.java:215: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile checkpoint3 = new RSTile(3023, 3355);
  ^
aMinerFree.java:216: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile walkcheck = new RSTile(3016, 3338);
  ^
aMinerFree.java:217: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile laddercheck = new RSTile(3017, 9739);
  ^
aMinerFree.java:218: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile MGMithril = new RSTile(3049, 9736);
  ^
aMinerFree.java:219: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile MGfailsafe = new RSTile(3046, 9753);
  ^
aMinerFree.java:221: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile YOres = new RSTile(2625, 3141);
  ^
aMinerFree.java:222: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile YSafety = new RSTile(2610, 3127);
  ^
aMinerFree.java:224: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile LSoreCheck = new RSTile(3146, 3148);
  ^
aMinerFree.java:225: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile LSBankingCheck = new RSTile(3092, 3243);
  ^
aMinerFree.java:226: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile LSsafeCombat = new RSTile(3162, 3152);
  ^
aMinerFree.java:227: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile LSores = new RSTile(3148, 3150);
  ^
aMinerFree.java:229: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile FWbankToWall = new RSTile(2938, 3355);
  ^
aMinerFree.java:230: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile FWoutsidewall = new RSTile(2934, 3355);
  ^
aMinerFree.java:231: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile FWinsidewall = new RSTile(2936, 3355);
  ^
aMinerFree.java:232: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile FWwalltobank = new RSTile(2945, 3368);
  ^
aMinerFree.java:233: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile FWsafety = new RSTile(2903, 3366);
  ^
aMinerFree.java:234: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  RSTile m1d1position;
  ^
aMinerFree.java:278: cannot find symbol
symbol  : class RSTile
location: class scripts.aMinerFree
  public static RSTile banktile;
                ^
100 errors

and my how can i get the RSTile in the script? This is the code in my script import org.tribot.api2007.RSTile; and this is the link https://tribot.org/doc/org/tribot/api2007/types/RSTile.html

  • And what does the message of the first of these 100 errors say? Fix it, then fix the remaining ones, until you don't have any error anymore. Reading the message is the key. – JB Nizet Sep 28 '13 at 13:36
  • Well, the brackets quite simply shouldn't be there. So you really should look at the errors you get when you remove them (which we can't help you with if you don't post them). – Bernhard Barker Sep 28 '13 at 13:37
  • That's not helpful. Take all but the first one out. – duffymo Sep 28 '13 at 13:40
  • Thats my errors when i delete the () – user2824775 Sep 28 '13 at 13:40
  • `Cannot find symbol : class RSTile` means that the compiler doesn't know about a class named RSTile. Either you misspelled it, or it's not imported, or it's imported but not available in the classpath. – JB Nizet Sep 28 '13 at 13:41
  • That's really the same error repeated 100 times at different places. – Bernhard Barker Sep 28 '13 at 13:46
  • Yeah i can see that but how can i put the RSTile import in there?import org.tribot.api2007.RSTile; – user2824775 Sep 28 '13 at 13:56

1 Answers1

0

What did you intend to put inside the parentheses? Perhaps you meant to cast to long?

You ought to think about how to convert a double to a long:

double to long conversion

Community
  • 1
  • 1
duffymo
  • 305,152
  • 44
  • 369
  • 561