C
C#16mo ago
cllarence10

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

75 Replies
cllarence10
cllarence10OP16mo ago
im trying to code on godot with vs but this error appears
x0rld
x0rld16mo ago
remove the #
cllarence10
cllarence10OP16mo ago
thats the thing i dont have#
cllarence10
cllarence10OP16mo ago
cllarence10
cllarence10OP16mo ago
this is the code
Thinker
Thinker16mo ago
What is the path of the project?
cllarence10
cllarence10OP16mo ago
uh how do i check oh well my godot project is
cllarence10
cllarence10OP16mo ago
cllarence10
cllarence10OP16mo ago
that is where my project is
Angius
Angius16mo ago
Angius
Angius16mo ago
Here's the #
cllarence10
cllarence10OP16mo ago
OH the name of the file is the issue?!
Angius
Angius16mo ago
As a general rule, avoid using special characters for code, paths, everything Ideally, avoid even using whitespace
cllarence10
cllarence10OP16mo 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
cllarence10OP16mo ago
cllarence10
cllarence10OP16mo ago
cllarence10
cllarence10OP16mo ago
this is the new
Angius
Angius16mo ago
Well, you created a classlib project
cllarence10
cllarence10OP16mo ago
place
x0rld
x0rld16mo ago
you did a library not an executable
cllarence10
cllarence10OP16mo ago
a library?
Angius
Angius16mo ago
Yes Something that other projects can use
cllarence10
cllarence10OP16mo ago
this?
Angius
Angius16mo 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
cllarence10OP16mo ago
ye thers an sln
cllarence10
cllarence10OP16mo ago
im not sure what that is
Angius
Angius16mo ago
Close Visual Studio, and double-click that sln Yeah Just agree, that's whatever Just line endings
cllarence10
cllarence10OP16mo ago
cllarence10
cllarence10OP16mo ago
i got the same error again
Kouhai
Kouhai16mo ago
You can't run the library from visual studio Godot should take care of that
x0rld
x0rld16mo ago
how godot is supposed to use c#
Angius
Angius16mo ago
Does Godot have any documentation on using C#? If so, follow that
Kouhai
Kouhai16mo ago
It does
Kouhai
Kouhai16mo 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
cllarence10OP16mo 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
Kouhai16mo ago
You don't run your Godot C# script from visual studio Godot itself should take care of that
cllarence10
cllarence10OP16mo ago
so i code it in vs then run it in godot
Kouhai
Kouhai16mo ago
Yes
cllarence10
cllarence10OP16mo ago
im trying that rn but it doesnt come up with the console messge
cllarence10
cllarence10OP16mo ago
cllarence10
cllarence10OP16mo ago
nothing here
Kouhai
Kouhai16mo ago
Maybe Console.WriteLine doesn't works for Godot
x0rld
x0rld16mo 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
Kouhai16mo ago
^
cllarence10
cllarence10OP16mo ago
cllarence10
cllarence10OP16mo ago
x0rld
x0rld16mo ago
is it saved ?
cllarence10
cllarence10OP16mo ago
oh i have to save the vs first then run?
Kouhai
Kouhai16mo ago
Yes
cllarence10
cllarence10OP16mo ago
ok i saved it but its not coming up by save you mean pressing save all right
cllarence10
cllarence10OP16mo ago
Kouhai
Kouhai16mo ago
Did you make sure you've attached the script and ran the game?
cllarence10
cllarence10OP16mo 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
Kouhai16mo ago
Wrong langauge?
cllarence10
cllarence10OP16mo ago
woah that worked
cllarence10
cllarence10OP16mo ago
cllarence10
cllarence10OP16mo ago
hello is helloing
Kouhai
Kouhai16mo ago
<:MadoThumbsUp_MM:406514447973351444>
cllarence10
cllarence10OP16mo ago
yeah i was coding in gdscript
Kouhai
Kouhai16mo ago
Oh
cllarence10
cllarence10OP16mo ago
and my teacher told me we were supposed to code in c#
cllarence10
cllarence10OP16mo ago
look at this 😭
cllarence10
cllarence10OP16mo ago
on teams left me in the dust
x0rld
x0rld16mo ago
🤔
cllarence10
cllarence10OP16mo ago
mb more context
x0rld
x0rld16mo ago
search a tutorial or something to learn how to use c# with godot
Kouhai
Kouhai16mo ago
Have you used C# before?
cllarence10
cllarence10OP16mo 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
Thinker16mo ago
Is your assignment specifically to work with C# in Godot?
cllarence10
cllarence10OP16mo ago
kinda yes its the ocr A level syllabus im in the uk
Thinker
Thinker16mo ago
odd assignment but sure
cllarence10
cllarence10OP16mo 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
Thinker16mo ago
Yeah, a lot easier than C# if it's your first language Especially since it's literally designed for the engine
cllarence10
cllarence10OP16mo 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
Accord16mo 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.

Did you find this page helpful?