• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows So I do the space rocks tutorial in DND and got an early compilation error

Aegri

Member
Heya, I started out with the space rocks tutorial for drag and drop and all works fine until I get at the point of defining key up behaviour. I follow the tutorial video and make a call function -> motion_add -> image_angle as first variable -> 0.05 as second variable.

As soon as I hit F5 the compiler starts up and arrives at following error messages:

wrong number of arguments for function motion_add
got 'image_angle' expected ')'
wrong number of arguments for function motion_add

I'm very confused what this means.
 
Sadly I use gml not dnd and I recommend you take some gml tutorials too, it helps you in the long run and you will get coding experience so if you ever wanted to switch to something else you will still have a basic understanding and I think most of the people here use gml too that error means that you need to close of led your code I’m sorry I do not know more about drag and drop but what I mean is you just forgot to fill in your code or something.
 

samspade

Member
Heya, I started out with the space rocks tutorial for drag and drop and all works fine until I get at the point of defining key up behaviour. I follow the tutorial video and make a call function -> motion_add -> image_angle as first variable -> 0.05 as second variable.

As soon as I hit F5 the compiler starts up and arrives at following error messages:

wrong number of arguments for function motion_add
got 'image_angle' expected ')'
wrong number of arguments for function motion_add

I'm very confused what this means.
I haven't used DND in awhile but I've seen a number of these pop up since 2.3 as the tutorials use a prior version of GM with slight differences. I would read this article (see the portion about declaring new functions especially in DND) and make sure you're using the correct 2.3 form (which will be different than the tutorials). As a side note, YoYo has said they're working on updated tutorials, so hopefully this will soon be a problem of the past.
 

Aegri

Member
Okay I found out what troubles game maker studio, in the call function name line it did automatically place "motion_add()" removing the brackets removes the compilation error. Well so much on the confusion, still that is confusing interface design nevertheless.

Well so much for my hope they would have build in a visual coding interface (scratch or labview are examples of such).
 
Top