Sheep Herder Lesson 2 Error.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
rkeenjr
Posts: 2
Joined: Wed Apr 17, 2013 6:49 pm

Sheep Herder Lesson 2 Error.

Post 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
paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm

Re: Sheep Herder Lesson 2 Error.

Post 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
rkeenjr
Posts: 2
Joined: Wed Apr 17, 2013 6:49 pm

Re: Sheep Herder Lesson 2 Error.

Post by rkeenjr »

I will give that a try thank you!

RKeenJr
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Sheep Herder Lesson 2 Error.

Post 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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Post Reply