C
C#10mo ago
cllarence10

❔ Godot with c# with vs help very wierd technical error not even code

75 Replies
cllarence10
cllarence1010mo ago
im trying to code on godot with vs but this error appears
x0rld
x0rld10mo ago
remove the #
cllarence10
cllarence1010mo ago
thats the thing i dont have#
cllarence10
cllarence1010mo ago
cllarence10
cllarence1010mo ago
this is the code
Thinker
Thinker10mo ago
What is the path of the project?
cllarence10
cllarence1010mo ago
uh how do i check oh well my godot project is
cllarence10
cllarence1010mo ago
cllarence10
cllarence1010mo ago
that is where my project is
Angius
Angius10mo ago
Angius
Angius10mo ago
Here's the #
cllarence10
cllarence1010mo ago
OH the name of the file is the issue?!
Angius
Angius10mo ago
As a general rule, avoid using special characters for code, paths, everything Ideally, avoid even using whitespace
cllarence10
cllarence1010mo ago
thank you ok i remade the project and renamed it to CS project but it still comes up with same error ok well not the same but
cllarence10
cllarence1010mo ago
cllarence10
cllarence1010mo ago
cllarence10
cllarence1010mo ago
this is the new
Angius
Angius10mo ago
Well, you created a classlib project
cllarence10
cllarence1010mo ago
place
x0rld
x0rld10mo ago
you did a library not an executable
cllarence10
cllarence1010mo ago
a library?
Angius
Angius10mo ago
Yes Something that other projects can use
cllarence10
cllarence1010mo ago
this?
Angius
Angius10mo ago
Not a project in itself Ah, okay Did Godot generate an .sln file anywhere? If so, open that Not the individual .cs files
cllarence10
cllarence1010mo ago
ye thers an sln
cllarence10
cllarence1010mo ago
im not sure what that is
Angius
Angius10mo ago
Close Visual Studio, and double-click that sln Yeah Just agree, that's whatever Just line endings
cllarence10
cllarence1010mo ago
cllarence10
cllarence1010mo ago
i got the same error again
Kouhai
Kouhai10mo ago
You can't run the library from visual studio Godot should take care of that
x0rld
x0rld10mo ago
how godot is supposed to use c#
Angius
Angius10mo ago
Does Godot have any documentation on using C#? If so, follow that
Kouhai
Kouhai10mo ago
It does
Kouhai
Kouhai10mo ago
Godot Engine documentation
C#
C# basics, C# features, C# API differences to GDScript, C# collections, C# Variant, C# signals, C# exports, C# global classes, C# style guide.
cllarence10
cllarence1010mo ago
Godot Engine documentation
C# features
This page provides an overview of the commonly used features of both C# and Godot and how they are used together. Type conversion and casting: C# is a statically typed language. Therefore, you can'...
Kouhai
Kouhai10mo ago
You don't run your Godot C# script from visual studio Godot itself should take care of that
cllarence10
cllarence1010mo ago
so i code it in vs then run it in godot
Kouhai
Kouhai10mo ago
Yes
cllarence10
cllarence1010mo ago
im trying that rn but it doesnt come up with the console messge
cllarence10
cllarence1010mo ago
cllarence10
cllarence1010mo ago
nothing here
Kouhai
Kouhai10mo ago
Maybe Console.WriteLine doesn't works for Godot
x0rld
x0rld10mo ago
as I see in the doc it's GD.Print("Hello from C# to Godot :)"); https://docs.godotengine.org/en/stable/tutorials/scripting/c_sharp/c_sharp_basics.html
Kouhai
Kouhai10mo ago
^
cllarence10
cllarence1010mo ago
cllarence10
cllarence1010mo ago
x0rld
x0rld10mo ago
is it saved ?
cllarence10
cllarence1010mo ago
oh i have to save the vs first then run?
Kouhai
Kouhai10mo ago
Yes
cllarence10
cllarence1010mo ago
ok i saved it but its not coming up by save you mean pressing save all right
cllarence10
cllarence1010mo ago
Kouhai
Kouhai10mo ago
Did you make sure you've attached the script and ran the game?
cllarence10
cllarence1010mo ago
its been 4 hours since ive realised that ive been coding in the wrong language and i still cant get the ide to work lmao( 😭 )
Kouhai
Kouhai10mo ago
Wrong langauge?
cllarence10
cllarence1010mo ago
woah that worked
cllarence10
cllarence1010mo ago
cllarence10
cllarence1010mo ago
hello is helloing
Kouhai
Kouhai10mo ago
<:MadoThumbsUp_MM:406514447973351444>
cllarence10
cllarence1010mo ago
yeah i was coding in gdscript
Kouhai
Kouhai10mo ago
Oh
cllarence10
cllarence1010mo ago
and my teacher told me we were supposed to code in c#
cllarence10
cllarence1010mo ago
look at this 😭
cllarence10
cllarence1010mo ago
on teams left me in the dust
x0rld
x0rld10mo ago
🤔
cllarence10
cllarence1010mo ago
mb more context
x0rld
x0rld10mo ago
search a tutorial or something to learn how to use c# with godot
Kouhai
Kouhai10mo ago
Have you used C# before?
cllarence10
cllarence1010mo ago
some im very inexperienced using it outside of basic things by basic things i mean like making some mathematical function using the mathematical operations or writing in the console i mainly use it for math
Thinker
Thinker10mo ago
Is your assignment specifically to work with C# in Godot?
cllarence10
cllarence1010mo ago
kinda yes its the ocr A level syllabus im in the uk
Thinker
Thinker10mo ago
odd assignment but sure
cllarence10
cllarence1010mo ago
our teacher wants us to do c# anyway and ergo we are all under his knuckle its also my first time making a game gd script was a hella alot easier i understood more lol
Thinker
Thinker10mo ago
Yeah, a lot easier than C# if it's your first language Especially since it's literally designed for the engine
cllarence10
cllarence1010mo ago
😭 learning in c# will maybe help me in the furture though im going to get a job in programming anyway after uni or something to do with nvidea lol
Accord
Accord10mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.