Execution Error: No Such Object

This is the place to discuss all things relating to using LiveCode For FM, the LiveCode interface for FileMaker.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
Newbie1
Posts: 3
Joined: Thu Jun 28, 2018 9:27 pm

Execution Error: No Such Object

Post by Newbie1 » Thu Jun 28, 2018 9:49 pm

The following is code for a Brick Breaker game I am developing, but I keep getting the error "Execution Error: No Such Object" and I have tried everything to solve it, but nothing has worked, and yes I have checked for naming and spacing errors. Does anyone know how to solve this problem?

Here's the code:
on moveBallx
if TF is true then
checkWall
checkBox
set right of graphic "BallTest" to right of graphic "BallTest" + x --This is the line that keeps saying: (Chunk: No Such Object, char 39)
send "moveBallx" to me in 1
end if
end moveBallx

Thanks.

Klaus
Posts: 10168
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Execution Error: No Such Object

Post by Klaus » Thu Jun 28, 2018 9:57 pm

Hi Newbie1,

welcome to the forum!

I have to guess here, try using brackets first:

Code: Select all

...
set the right of graphic "BallTest" to (the right of graphic "BallTest" + x)
...
Best

Klaus

Newbie1
Posts: 3
Joined: Thu Jun 28, 2018 9:27 pm

Re: Execution Error: No Such Object

Post by Newbie1 » Thu Jun 28, 2018 10:06 pm

Klaus,
Thanks for the welcome!

I tried to implement the brackets in my code, but I got the same result. Is there anything else that you know of which could solve this error? Let me know if you need me to provide you with more code.Thanks.

Best

Newbie1

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2207
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Execution Error: No Such Object

Post by jmburnod » Fri Jun 29, 2018 6:35 am

Hi Newbie1,
x is a param which must contain an integer, try this

Code: Select all

on domoveBallx 
moveBallx 10
end  domoveBallx 

on moveBallx x 
....
set the right of graphic "BallTest" to (the right of graphic "BallTest" + x)
...
end moveBallx x
Best regards

SparkOut
Posts: 1750
Joined: Sun Sep 23, 2007 4:58 pm

Re: Execution Error: No Such Object

Post by SparkOut » Fri Jun 29, 2018 7:48 am

What happens in the checkWall and checkBox handlers?
Do they check for a collision and delete the graphic if so?
The graphic seems to have been deleted, so how do you handle exiting the loop? You send the handler again in 1. Maybe you should

Code: Select all

if "moveBallx" is not in the pendingMessages then
  send "moveBallx" to me in 1
end if

Newbie1
Posts: 3
Joined: Thu Jun 28, 2018 9:27 pm

Re: Execution Error: No Such Object

Post by Newbie1 » Fri Jun 29, 2018 5:20 pm

jmburnod and SparkOut,
Thank you so much for your help. Although I couldn't solve the error message, my teacher just said to leave it since he couldn't figure it out as well.

Best Regards,
Newbie1

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2207
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Execution Error: No Such Object

Post by jmburnod » Fri Jun 29, 2018 5:44 pm

Hi Newbie1,
I believe understand that is one homework.
What Klaus and Spatkout said
Please read your script one more and add this line after first line of your handler

Code: Select all

on moveBallx
   answer x
...
end moveBallx
and try this

Code: Select all

on StartMoveBallx
moveBallx 10
end StartMoveBallx

on moveBallx x
   answer x
...
end moveBallx
Good luck for next step

Post Reply

Return to “LiveCode for FM”