Page 1 of 1

Sheep Herder Lesson 2 Error.

Posted: Wed Apr 17, 2013 7:10 pm
by rkeenjr
Edit: I guess I should have mentioned I am using Commercial Edition 6.0.0

I am a total beginner and trying to learn through this tutorial, however when I arrive at the end of the lesson and check my script in the stack it is throwing an error.

Line with Error:
if intersect (button("sheep"&x), graphic"pen","opaque pixels") is false and intersect(button"sheep"&x),group"groupControls","bounds") is false then

Error Message:
card id 1002: compilation error at line 16 (intersect: two objects are required) near "&", char 93

Thanks for you help!
RKeenJr

Re: Sheep Herder Lesson 2 Error.

Posted: Wed Apr 17, 2013 11:32 pm
by paul_gr
Hi RKeenJr,
I haven't seen the sheepshaver lesson you are using, but here's a few pointers.
First clue: Number of brackets being used in the if statement is 7, should be an even number as brackets must be used in pairs. So there is definitely a () error in there, maybe more than one.
Use spaces after operators, keywords and commas; will make it easier for you (and others) to see errors in your code..

try this

if intersect( button("sheep" & x), graphic "pen", "opaque pixels") is false and intersect( button("sheep" & x), group "groupControls", "bounds") is false then

Paul

Re: Sheep Herder Lesson 2 Error.

Posted: Wed Apr 17, 2013 11:55 pm
by rkeenjr
I will give that a try thank you!

RKeenJr

Re: Sheep Herder Lesson 2 Error.

Posted: Thu Apr 18, 2013 5:58 pm
by jacque
If it still doesn't work after you fix the script error, it's because there's a known bug in the intersect function in LiveCode 6 when you use the "opaque pixels" parameter. It's been fixed for the next update which will be out very soon.