Activist Posted December 17, 2012 Share Posted December 17, 2012 Hey guys! So I'm currently writing a script, I've hit a problem and Google doesn't seem to be helping. program New; var eTimeRemainingMinutes: integer; var eTimeRemainingSeconds: integer; var aTimeRemainingMinutes: integer; var aTimeRemainingSeconds: integer; var capTimeRemaining: integer; var eTimeRemaining: integer; var aTimeRemaining: integer; var capTimeUsed: integer; var eCompleted: integer; var aTimeWaited: integer; begin eTimeRemainingMinutes := 1; //CUSTOM eTimeRemainingSeconds := 2; //CUSTOM aTimeRemainingMinutes := 3; //CUSTOM aTimeRemainingSeconds := 4; //CUSTOM capTimeRemaining := 45; //CUSTOM eTimeRemaining := (eTimeRemainingMinutes*60 + eTimeRemainingSeconds) * 1000; aTimeRemaining := (aTimeRemainingMinutes*60 + aTimeRemainingSeconds) * 1000; capTimeRemaining := (capTimeRemaining*60) * 1000; capTimeUsed := 0; //INSERT command to open application //INSERT clickmouse(-88,140) // Goto main area while (capTimeRemaining <= capTimeUsed) do [b]//HERE IS THE ERROR LINE[/b] begin wait(eTimeRemaining+random(3000)); capTimeUsed := capTimeUsed + eTimeRemaining; earnsCompleted := 0; aTimeWaited := eTimeRemaining; while not aTimeRemaining <= aTimeWaited do begin //INSERT clickmouse(-887,278); //Shortcut to e wait(random(3000)); //INSERT clickmouse(-887,278); //Commence e earnsCompleted := earnsCompleted + 1; wait(2*60*1000); capTimeUsed := capTimeUsed + 120; aTimeWaited := eCompleted*180 + eTimeRemaining - 60; wait(60*1000+random(3000)); capTimeUsed := capTimeUsed + 63; aTimeWaited := eCompleted*180 + eTimeRemaining; end; //INSERT mouseclick(-364, 345); //Choose a //INSERT mouseclick(-272, 378); //Commence a aTimeRemaining := 20*60; eTimeRemaining := 60; end; //FUNCTION Play a sound to notify the user that the cap time is complete end. Whenever I try run it, it comes up with "Compiler Error" & "Invalid number of parameters" on the line with the first while loop and I can't figure out why. This is my first time writing a SCAR script from scratch and I've following the tutorial guidelines as best as I can. Please ignore the "//INSERT mouseclick" selfnote etc, I am intending to change that to proper code which instructs mouseclicking later. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted December 17, 2012 Share Posted December 17, 2012 (edited) What version of SCAR are you using? Compiled just fine for me using SCAR 3.38 once I added in the missing declaration for earnsCompleted. Edit: Just compiled this using versions 3.30, 3.31, 3.32, 3.33, 3.34, 3.35, 3.36, 3.37, and 3.38. Edited December 17, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
Activist Posted December 17, 2012 Author Share Posted December 17, 2012 Wow, thanks for such commitment in helping, testing it out in all those versions. I current am running 3.38 though. Oddest thing in the world! I just copied that code, did the same as you regarding the variable & suddenly it works on a fresh page. O_o Thank you for your help! Quote Link to comment Share on other sites More sharing options...