SRL Archive - OSR Help

FindObjCustom help


jhony6180

2012-05-22 07:20:12

Hi …. im new … im trying to learn to script …..

im watching Yohojo's tutorials …. and there awsome … but … i cant quite figure out the problem i have with this

function Chop: Boolean;
var
x, y: Integer;
Begin
If FindObjCustom(x, y, 'Chop', 'down', 'p d'), (2501689, 2568773, 3950426, 2501689, 3029317), 10) Then
WriteLn ('Found It');
End;


when i try to compile to see if it works all it says is

[Error] (75:48): 'THEN' expected at line 74
Compiling failed.

can anyone help me solve this problem please :D please dont say :google: coz i have … repeatedly lol

CephaXz

2012-05-22 07:21:55

It's better if you can post the whole script.

YoHoJo

2012-05-22 07:23:20

Too many parenthesis!

If FindObjCustom(x, y, 'Chop', 'down', 'p d'), (2501689, 2568773, 3950426, 2501689, 3029317), 10) Then

should be

If FindObjCustom(x, y, ['Chop', 'down', 'p d'], [2501689, 2568773, 3950426, 2501689, 3029317], 10) Then

^Something more like that :p
Not 100% sure, but mine's closer than yours :p.

Make the video full screen and highest quality to see the code more clearly! Good luck.

Also wrong section, this belongs in scripting help section.
Moved it!

jhony6180

2012-05-22 07:29:59

lmao thanks yohojo :) and i have the video in full screen and on 1080p coz my laptops kool lol i just didnt see that they where [] rather than () :)

P.S your videos are awsome help lol :)

EDIT: it has now compiled properly :)

CephaXz

2012-05-22 07:32:29

OMG! Feel so dumb for not seeing that error :p

jhony6180

2012-05-22 09:35:09

From: CephaXz
OMG! Feel so dumb for not seeing that error :p


now imagine how dumb i feel watching the tutorial and STILL creating the error in the first place :P