C
C#15mo ago
cllarence10

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

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