• 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 Script suggestions don't work.

E

Epicrex

Guest
GM no suggestion.png
The red bar at the bottom should say "ScreenShake(Magnitude,Frames)" as a suggestion. I closed and reopend the script and GML, but that didn't help.
 

Yal

🐧 *penguin noises*
GMC Elder
What happens if you define it like this?
GML:
function ScreenShake(magnitude, frames){
  //actual code here
}
 
E

Epicrex

Guest
What happens if you define it like this?
GML:
function ScreenShake(magnitude, frames){
  //actual code here
}
The problem isn't that it's not working but just that it doesn't give me the suggestion of what comes between the brackets or did I miss undertsand. Also, would that go in my ScreenShake script or in my object where i define the ScreenShake variables.
 

FrostyCat

Redemption Seeker
RefresherTowel is telling you to replace @desc with @func. These JSDoc comments are where the hints come from, not the function line.
GML:
///@func Screenshake(magnitude, frames)
///@arg {real} magnitude The strength of the shake (radius in pixels)
///@arg {int} frames The length of the shake in frames
function Screenshake(magnitude, frames) {
    ...
}
 

Yal

🐧 *penguin noises*
GMC Elder
The problem isn't that it's not working but just that it doesn't give me the suggestion of what comes between the brackets or did I miss undertsand.
If you write a proper function description, it takes priority over JSDoc comments for intellisense... and descriptive argument names also makes the function easier to use. Also it takes up less space than the JSDoc comments and is faster to type out. So I'd strongly recommend using the function description over the JSDoc comments now when it's possible.
 
Top