SRL Archive - FAQ

Invalid Number of Parameters with FindColor


QuasiNoob

2011-11-30 22:12:17

I'm making a simple script for a private server, but it keeps complaining of "invalid number of parameters" at a certain FindColor call.

procedure BankStuff;
begin
FindColor(x, y, 5060610, MSX1, MSY1, MSX2, MSY2)
ClickMouse(x, y, 0, 0, mouse_Left)
FindColor(x, y, 874323, MSX1, MSY1, MSX2, MSY2) //Error is here
ClickMouse(x, y, 0, 0, mouse_Left)
FindColor(x, y, 4933712, MSX1, MSY1, MSX2, MSY2)
ClickMouse(x, y, 0, 0, mouse_Right)
ClickMouse(x, y+40, 0, 0, mouse_Left)
FindColor(x, y, 5263705, MSX1, MSY1, MSX2, MSY2)
ClickMouse(x, y, 0, 0, mouse_Right)
ClickMouse(x, y+70, 0, 0, mouse_Left)
FindColor(x, y, 1909802, MSX1, MSY1, MSX2, MSY2)
ClickMouse(x, y, 0, 0, mouse_Left)
ClickMouse(267, 372, 0, 0, mouse_Left)
ClickMouse(295, 374, 0, 0, mouse_Left)
end;

Any tips on fixing this?

Harry

2011-11-30 23:20:18

Semicolons after every statement that isn't a begin/then etc.

i luffs yeww

2011-12-01 01:25:00

ClickMouse only takes three parameters, I think? And you shouldn't be using ClickMouse. Use Mouse.

YoHoJo

2011-12-01 01:29:46

From: i luffs yeww
ClickMouse only takes three parameters, I think? And you shouldn't be using ClickMouse. Use Mouse.


yeah! I think that's what the problem is, your FindColors are fine but ClickMouse just needs to be ClickMouse(x,y, mouse_left);

@Luffs, he's using it for a private server, so those will work fine.