PDA

View Full Version : Compiling issue, Help with my first script since returning to the interwebs



SOUPalmighty
02-07-2014, 08:25 PM
Sup Gents, So Ive been working on my first script in over a year, just trying to get the basics down as i relearn everything.

I think i got everything in its place but while compiling i get the message
"Exception in Script: Don't know which overloaded method to call with params (Int32, Int32,...Int32, Int32, Int32) at line 31, column 15"

which refers to this line
"mainscreen.findObject(x, y, 14673137, 10, colorsetting(2,0.47,3.92), mainscreen.playerpoint,10,2,10,MOUSE_LEFT);"

this also happens with my other "findobject" line when i "//" out the first one.

Any info on what im doing wrong would be awesome, im looking to learn. I also attached the full script as is right now if anyone want to take a look at it as well.

thx

do
begin
loginName := 'username';
password := 'password';
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;

procedure OpenBankChest();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;

Repeat
mainscreen.findObject(x, y, 1396331, 4, colorsetting(2, 0.05, 0.31), mainscreen.playerpoint, 20, 15, 20,MOUSE_LEFT);
wait(randomRange(1000, 2000));
inc(i);
Until BankScreen.isOpen() or (i >= 15);
end;

procedure HandleBanking();
begin
if (bankScreen.isOpen()) then
wait(randomRange(1000, 2000));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);

begin
bankscreen.withdraw(10, WITHDRAW_AMOUNT_ALL_BUT_ONE, ['Flax']);
wait(randomRange(500, 1500));
Bankscreen.close
end;
end;

procedure RuntoWheel();
var
pathToWheel: TPointArray;
begin
if not isLoggedIn() then
exit;

pathToWheel := [Point(, ), Point(, ), Point(, ), Point(, ), Point(, ), Point(, ), Point(, )];

if SPS.walkPath(pathToWheel) then
minimap.waitPlayerMoving()
else
writeLn('failed to travel to wheel');

end;

procedure OpenWheelMenu();
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;

repeat
mainscreen.findObject(x, y, 14673137, 10, colorsetting(2,0.47,3.92), mainscreen.playerpoint,10,2,10,MOUSE_LEFT);
wait(randomRange(1000, 2000));
inc(i);
until ProductionScreen.isOpen() or (i >= 15);
end;

procedure HandleSpinning();

begin
if (productionScreen.isOpen()) then
wait(randomRange(1000, 2000));
(productionScreen.clickStart());
end;


procedure Runtobank();
var
pathToBank: TPointArray;
begin
repeat
if (progressScreen.isOpen) then
Wait(randomRange(5000, 10000));
until ProgressScreen.isopen() := false;

inc(loadsDone);
wait(randomrange(500, 1000));

begin
pathToBank := [Point(, ), Point(, ), Point(, ), Point(, ), Point(, ), Point(, ), Point(, )];

if SPS.walkPath(pathToBank) then
minimap.waitPlayerMoving()
end;
end;

procedure progressReport();
var
FlaxSpun, profit, profitPerHour: integer;
begin
FlaxSpun := LoadsDone * 28;
profit := (FlaxSpun * 120);
profitPerHour := round((profit * 60) / (getTimeRunning() / 60000));

writeLn('========================================= ===============');
writeLn('SOUPalmightys Flax Spinner');
writeLn('Time Running: ' + timeRunning);
writeLn('Bowstrings Made: ' + intToStr(FlaxSpun));
writeLn('Loads Done: ' + intToStr(loadsDone));
writeLn('Profit Made: ' + intToStr(profit));
writeLn('Per Hour: ' + intToStr(profitPerHour));
writeLn('========================================= ===============');
end;

{Main Loop}
begin
clearDebug();
smartEnableDrawing := true;
setupSRL();
declarePlayers();

if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
mainScreen.setAngle(MS_ANGLE_HIGH);
minimap.setAngle(MM_DIRECTION_NORTH);
end;

OpenBankChest();
HandleBanking();
RuntoWheel();
OpenWheelMenu();
HandleSpinning();
Runtobank();
progressReport();

end. ]

The Mayor
02-07-2014, 09:13 PM
Sup Gents, So Ive been working on my first script in over a year, just trying to get the basics down as i relearn everything.

I think i got everything in its place but while compiling i get the message
"Exception in Script: Don't know which overloaded method to call with params (Int32, Int32,...Int32, Int32, Int32) at line 31, column 15"

which refers to this line
"mainscreen.findObject(x, y, 14673137, 10, colorsetting(2,0.47,3.92), mainscreen.playerpoint,10,2,10,MOUSE_LEFT);"

this also happens with my other "findobject" line when i "//" out the first one.

Any info on what im doing wrong would be awesome, im looking to learn. I also attached the full script as is right now if anyone want to take a look at it as well.

thx



You forgot the second to last parameter, the mouseOverText.


mainscreen.findObject(x, y, 1396331, 4, colorsetting(2, 0.05, 0.31), mainscreen.playerpoint, 20, 15, 20,['hello'], MOUSE_LEFT);


PS: You forgot this on a couple of other lines also, and your script won't compile with the SPS path TPointArrays left incomplete :)

SOUPalmighty
02-07-2014, 09:53 PM
Haha, knew it was gonna be something simple :duh:

Thank you very much mayor, plus your tut has def helped me with the new srl

Ninja edit: Everything successfully complied when i comment out the blank walking path.