Have problem with Visual Studio

Im doing course 2D unity, and teacher told to press Control + full stop button. In my keyboard is “>”
But its says NO CODE ACTION AVALABLE

Im first time doing coding, and now im stuck, even he didnt explain how to do it. And same problem he didt explain how to make When you writing code like

finishEfffect.PLAY

When he finish write finishEffect in his program shows many methods to chose, play and more. i dont have it. i need write code and program didnt help me with “mby you what write this words?” i need write all code A to B by my self. how to do it to make easy life to?

2 Likes

Welcome to GameDev!

Yes, the full-stop (period key) is the same as the greater than > key.

You’re making the Snowboarder game, correct? I believe he uses a Windows operating system.

What operating system are you using? Some of the hoykeys are different between Win, Mac, and Linux.

Also, what was the reason why he told you to press CTRL+.?

For example, on a Mac, you can use CTRL+. to show hidden files in a folder (like the .gitignore file).

On Linux, CTRL+H is the hotkey combo to do the same thing. For example, I cannot see this .gitignore file until I press CTRL+H (or CTRL+. on a Mac).

It’s been a while since I did this project, so can you give some context as to what is going on?

Yes is section 3 and number 44.
Extract method. And i have windows 10 and i no idea how to do it. and dont know then how to go to next level

1 Like

and then when i do this control + > then its says NO CODE ACTION AVALABLE

1 Like

Ahh…you are referring to a hotkey combo to extract a method. That makes more sense now.

There is probably a plug-in that you would want to install to help with that. I don’t use Windows, so I don’t think I can help with that directly, but someone else here would probably know.

That said, when I encounter something like that, I just have to write the method out manually. He’s just showing you a Windows shortcut, but it likely will not work on Mac or Linux (like my experience) and possibly not on Windows unless you have the proper set-up.

Most of the hotkey combos they use don’t work for me and I either have to figure out the Linux equivalent, or I just have to do the task manually.

That said, I would recommend going back to the first section and checking the set-up videos again to see if you missed anything because there shouldn’t be any problems with Windows installations if the set-up is done properly.

As a complete beginner, I also had problems remembering how to write methods. If you’re having trouble writing methods manually (instead of using a hotkey combo to extract them), I would recommend checking Rick’s code to see how the method is written.

I see the part you are talking about is about 4:15 into the video. Here is the code you need to replicate:

Do not add the line that is highlighted in pink. That is to show that the ‘else if’ statement below is has been altered.

If you need to see more of the code, click on the link for “This lecture’s project resources” and that will take you to the repo where you can see all the changes made in this lecture.

2 Likes

When im doing CTR+> its like this, i want like he did to do method easy way

1 Like

I understand that you want to be able to do it the way he does, but please do not let that stop you from continuing. You can keep going if you just write the method out manually.

Think of it this way: You’ll be a better programmer if you write things out the long way. Having a shortcut will keep you from learning the full way of doing it. Then when you need to write a method without a shortcut, you won’t know what to do.

It is better for a beginner to write the full code out. You’re not missing anything at all, in fact, it is better practice for your understanding of how code works if you don’t use the shortcuts.

I used to get upset about this too, because most of his shortcuts don’t work for me at all, and the ones that do are often a different key combination.

Then I thought to myself, “Well, if I want to be a programmer, I better get used to writing code. This is what I signed up for.”

This is not a handicap, it’s an advantage.

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms