Search found 23 matches

by chaucer345
Sun Aug 10, 2014 8:34 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

Here's the code with improved syntax: local myWalls local characterSprites local numberOfWalls local intersectsTop local intersectsBottom local intersectsLeft local intersectsRight local playerSpeed on preOpenCard setUpVariables end preOpenCard command setUpVariables --set the player looking to the ...
by chaucer345
Fri Aug 08, 2014 10:02 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

[-hh] wrote:

Here's the script for the card. Hope it works. If not write back.
Hermann
Unfortunately, while the sprite could move, it just got stuck in the wall.
by chaucer345
Fri Aug 08, 2014 8:58 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

In an attempt to unify the various suggestions and test my understanding of what's going on I wrote the following script: local myWalls local characterSprites local numberOfWalls local intersectsTop local intersectsBottom local intersectsLeft local intersectsRight local playerSpeed on preOpenCard se...
by chaucer345
Fri Aug 08, 2014 1:31 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

Ah, I noticed that I had to run pre-open card again, sorry : (

Now I have an error at the following:

Code: Select all

if x is within line j of myRects then return true
card id 1002: execution error at line 53 (Operators is: left operand of 'within' is not a point) near "264", char 14
by chaucer345
Fri Aug 08, 2014 1:25 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

You mean like this?

Code: Select all

put "" into myNames
breakpoint 
put "pUp" into line 1 of myNames
put "pDown" into line 2 of myNames
put "pLeft" into line 3 of myNames
put "pRight" into line 4 of myNames -- = image names
Nothing changed.
by chaucer345
Fri Aug 08, 2014 1:03 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

I made the put "" into myNames addition and nothing changed. Then I did that and changed all instances of the word item to instances of the word line and nothing changed.
by chaucer345
Fri Aug 08, 2014 12:44 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

Code: Select all

put "pUp" into line 1 of myNames
put "pDown" into line 2 of myNames
put "pLeft" into line 3 of myNames
put "pRight" into line 4 of myNames -- = image names
Still produces the same error message and puts the same thing into myNames.
by chaucer345
Fri Aug 08, 2014 12:15 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

So I tried -hh's method, but I got a really weird error, maybe it doesn't like the way I initialized myNames? I initialized myNames as follows in the preOpenCard event: put the image "pUp" into line 1 of myNames put the image "pDown" into line 2 of myNames put the image "pLeft" into line 3 of myName...
by chaucer345
Thu Aug 07, 2014 11:20 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

Is there a way to count the number of objects in myRects so that I can put that number into a variable and use it to define the loop count generally?
by chaucer345
Thu Aug 07, 2014 8:40 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

The following code should do this, but I didn't test (wrote it down right out of my tired brain). Come back if something is going wrong, because I would like to use it with my kids next sunday. That's why I wrote it down in large, and because it's such a sunny Friday today. And please, write it als...
by chaucer345
Wed Aug 06, 2014 10:32 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

I think the error here is trying to use one coordinate (the top of the image) in the intersect test. Rather check an intersect of two graphic objects. I can't give much other info as I'm away with nothing but this phone at the moment, but Animation Engine had its own forum here. It's a very well cr...
by chaucer345
Wed Aug 06, 2014 9:07 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

You'll have to provide more code then just the intersect code, the error could be from many things. Simon Ah, the rest of the code is on the previous page. Nothing else has changed and the error message pointed to that line. Sorry about that, I should have been clearer. Also I was only trying to mo...
by chaucer345
Wed Aug 06, 2014 8:44 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

I think this is a great learning exercise, but I can't stop myself from mentioning Animation Engine and looking up constrainRectangular (and other constrain variants). Could you link to explanations of these? They sound very interesting. ((Sorry for the double post, I was trying to edit the first a...
by chaucer345
Wed Aug 06, 2014 8:39 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

Okay, so this: if  intersect (the top of image "pUp", graphic "Rectangle1", 255) then       put true into intersectst    else       put false into intersectst    end if Gives me this error message instead, but only when I try to do the collision, not on compilation: card id 1002: execution error at ...
by chaucer345
Wed Aug 06, 2014 7:34 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Syntax problem, how is then missing in this statement
Replies: 47
Views: 25102

Re: Syntax problem, how is then missing in this statement

When I try this: if  intersect ((the top of image pUp, Rectangle Rectangle1, 255) then       put true into intersectst    else       put false into intersectst I get the following error message: card id 1002: compilation error at line 70 (Expression: missing ')' before factor) near "Rectangle1", cha...