My program starts like this:
Setting up the screen and then:
Code:
Channel 3 to Bob 3
Shared A,B,C,D,E,F
A=Rnd(200): B=Rnd(100)
Set Bob 1,,,
Set Bob 2,,,
Set Bob 3,,,
Bob 1,A,B,1
Here Bob 1 is displayed on the random position on the screen.
.
.
.
.
Then I have some condition inside the loop for a procedure, that is called when LMB is pressed
Code:
Do
If Mouse Key=1 Then MOVEMENT
Loop
.
.
.
Now the program jumps to execute a procedure. Procedure looks like this:
Code:
Procedure MOVEMENT
C=X Mouse-128
D=Y Mouse-42
E=C-A
F=B-D
Bob 3, A, B, 2
(At this moment Bob 3 is displayed on the position of Bob 1. I would like it move to the position of the mouse cursor when I clicked LMB. Mouse position at this moment is C,D and the distance of the Bob 3 from the C,D is E horizontally, F vertically)
Code:
A$="S: Move E,F,100; Jump S"
Amal 3, A$
Amal On 3
End Proc
And now my problem. When I click LMB, Bob 3 is displayed where it should be, but the program is terminated with
Quote:
Syntax Error in animation string
Amal 3, A$
|
My opinion is that Move in animation string doesn't accept variable values E,F and expects numbers instead. It works when I put some numerical constants instead of letters there, for example Move 50,30,100. What can I do?