Tank Game Tutorial - "Mixed strings and numbers" error

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Total beginner here for CF2.5. I'm working through this Tank Game tutorial, and I'm failing at step 2 because what I think the tutorial is telling me to do just isn't available as an option in the software.

    Tutorial: Please login to see this link.

    I'm at this point in the instructions:

    However, It's not very clear how I'm supposed to add this when CF2.5 complains that the following line has "Mixed strings and numbers" and won't let me "OK" it.

    Quote

    Distance("Advanced Direction Object", X("P1Body"), Y("P1Body"), XMouse, YMouse)

    Further, the tutorial doesn't explain how to add the subsequent code to the other objects.

    I understand that many tutorials assume some ladder knowledge in the one following it. I've successfully built basic platformers, done the Chocobreak game, and they all work fine.

    Where I am struggling is understanding how in CF2.5 to do what the tutorial instructs when it says "add the following code in the Event Editor". Where should I add it specifically? Why is the code not accepted?

    This is what I have got, but it rejects the code as "Mixed strings and numbers." What am I doing wrong? Thank you for taking time to help.

    Please login to see this attachment.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!