Pale Gray

Greenhorn
+ Follow
since Apr 14, 2021
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pale Gray

Recently, I've been wanting to learn C# more or even migrate to its language as it has mostly the same syntax as Java, so I tried yesterday to do so.

The problem is, I downloaded the installer (Runtime and SDK), and even restarted my computer after installation, but whenever I try to run the command dotnet new console, it outputs this:



What is the specific problem to this? is it the installer that is breaking this?

Here are problems that may or may not effect this:

Is it because I'm on a Bootcamp drive?
Do I need to install the 32bit installer even though I'm on a 64bit pc?
What is Arm64 vs x64? (I installed the x64 version)
Am I using an outdated visual studio code or terminal? (My VSC is version 1.55.2, checked in about)
Things I have done:

Installed the SDK separately
Copied/Pasted the binaries for the .NET 5.0 SDK
I used dotnet --info and came out with NO SDK
Here is what outputs when I run the command dotnet --info:


If anyone knows the problem, it would be very helpful! Thanks alot!

~ Pale_Gray
7 months ago
Recently, I'm making a simple engine using raw java and its default libraries. I want to make simple constructor methods to draw images using paintComponent();, but I encounter an error and don't really know how to fix it to make it work properly.

Here is the problem: I made a class called Texture, then made its constructor in the class, like this:



first, I instantiate a Texture:



Then, I try to draw it using g.drawImage(); like this:



But I encounter an error saying "The method drawImage(Image, int, int, ImageObserver) in the type Graphics is not applicable for the arguments (Texture, int, int, null)"

I really don't know how to fix this besides deleting the Texture constructor and just doing what the constructor does but in the class.

How can I make the Texture class usable for the Image class in the method g.drawImage()?

Thank you for anyone's help, I've been having trouble with this. It's probably an easy fix but mistakes make you learn!

~ Pale-Gray

What I have tried:

I've tried changing the constructor to "public Image Texture() {}" but that won't work,
I've tried casting it to an Image "Texture tex = (Image) new Texture();