View Single Post
Old 30 August 2018, 22:35   #1
Puttymoon inhabitant
Predseda's Avatar
Join Date: Mar 2007
Location: The City of Townsville
Age: 42
Posts: 5,645
Send a message via ICQ to Predseda
AMAL animation string

My program starts like this:

Setting up the screen and then:
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

If Mouse Key=1 Then MOVEMENT
Now the program jumps to execute a procedure. Procedure looks like this:

Procedure MOVEMENT
C=X Mouse-128
D=Y Mouse-42
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)

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

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?
Predseda is offline  
Page generated in 0.04301 seconds with 11 queries