SRL Archive - OSR Help

semicolon/identifier errors


Jacob

2012-03-22 09:01:36

Compiler Error Line 6, Semicolon expected

(line 4)If (GetColor(432,347) = 254) Then
(line 5)ClickMouse(952, 91, True) Else
(line 6)ClickMouse(432, 347, True) Then

Jacob

2012-03-22 10:13:52

i put the semicolon, now its an identifier error

mixster

2012-03-22 10:56:42

You posted in the very wrong section and you double-posted as well, which is wrong in nearly all cases. In the future, please use the Scripting Help forum or something that has scripting and help mentioned somewhere in it and use the Edit button rather than making two posts in a row.

Your error is because you have "ClickMouse() then" when you don't need a then, just a semi-colon.

Nebula

2012-03-22 10:59:14

Either delete the then or add an if to the second error.

mixster

2012-03-22 12:32:40

ClickMouse isn't a function that returns a Boolean function, so you can't use it as the "argument" for an if…then

putonajonny

2012-03-23 20:26:07


If (GetColor(432, 347) = 254) Then //if the colour at point 432, 347 is 254 then
ClickMouse(952, 91, True) //do this
Else //otherwise
ClickMouse(432, 347, True); //do this
//Rest of script goes here...