Rofus-_-
Rofus-_-
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
nvm use this one
31 replies
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
you can take the .vscode there and place it inside your vurses code file your doing everything in
31 replies
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
it has .vscode in the file
31 replies
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
like this one
31 replies
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
if you look at the youtube you can see he have a lof of difrent files and i'm woundering if you hvae akk the things he has
31 replies
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
(ctrl + s to save and run it)
31 replies
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
do you have .vscode and everything in the setup so it can run?
31 replies
CC#
Created by Rofus-_- on 10/28/2023 in #help
❔ Big Problem in C# plz someone help
i wounder if i can use user32.dll in some way cuz it will help with movement
9 replies
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
you can't access the videos?
31 replies
CC#
Created by Dante The Badger on 10/28/2023 in #help
Weird behaviour if I included code after File.Exists
maybe need a conole.readline() idk i'm eating rn hope someone else can help u
13 replies
CC#
Created by Goose on 10/28/2023 in #help
❔ Is my Unity + VS setup correctly? (NEWBIE HELP:C)
so rn for me i am learning how to make games in unity and learn programing and a website etc.. ok so i will give you a link to what my teacher said what i need to have (idk maybe this will be in another languesh so try to translate or something: https://csharp.progdocs.se/, and if you want to see even the recorning on when this is made etc.. here: https://drive.google.com/drive/u/2/folders/1nsHcXyU_TyDm2T9Iav6X-mtrtqBp0OVM (this is in swedish and this was live when we were following so i recomend watching the "TIA_1 01 Ladda ner och öppna projekt från github" basiclly stand for what you need to download to get started)
31 replies
CC#
Created by Rofus-_- on 10/28/2023 in #help
❔ Big Problem in C# plz someone help
ok got i will see what i can do it with +rep
9 replies
CC#
Created by Dante The Badger on 10/28/2023 in #help
Weird behaviour if I included code after File.Exists
np tell me if it works because i am not 100%😅
13 replies
CC#
Created by Richards on 10/28/2023 in #help
❔ factorial using equation
you are assigning the value of i to factorial in each iteration of the loop, which is incorrect. you need to multiply the current value of factorial with the value of i. here is the correct way you can do it
static void Main(string[] args)
{
Console.WriteLine("Please enter your number: ");
int n = int.Parse(Console.ReadLine());

int factorial = 1;
int factorialres = 1;
for (int i = 1; i <= n; i++)
{
factorial *= i;
factorialres = factorial;
Console.WriteLine(factorialres + "" + i + " = " + factorial);
}
}
static void Main(string[] args)
{
Console.WriteLine("Please enter your number: ");
int n = int.Parse(Console.ReadLine());

int factorial = 1;
int factorialres = 1;
for (int i = 1; i <= n; i++)
{
factorial *= i;
factorialres = factorial;
Console.WriteLine(factorialres + "" + i + " = " + factorial);
}
}
3 replies
CC#
Created by Dante The Badger on 10/28/2023 in #help
Weird behaviour if I included code after File.Exists
you need to modify the CreateDb function to properly create the file and then call the SetupDb function. Here's the updated code:
private static void CreateDb(string dbFileName)
{
string dbFilePath = CreateDbPathString(dbFileName);
Console.WriteLine("Creating Db File");
File.Create(dbFilePath).Close(); // Create the file and immediately close the FileStream
DatabaseService newDbSetupService = SetupDbConnection(dbFileName, mode: false);
newDbSetupService.SetupDb();
}
private static void CreateDb(string dbFileName)
{
string dbFilePath = CreateDbPathString(dbFileName);
Console.WriteLine("Creating Db File");
File.Create(dbFilePath).Close(); // Create the file and immediately close the FileStream
DatabaseService newDbSetupService = SetupDbConnection(dbFileName, mode: false);
newDbSetupService.SetupDb();
}
you call the Close method on the FileStream returned by File.Create to ensure that the file is created immediately. Then, you proceed to call the SetupDb function as expected. Now, when the file does not exist, the CreateDb function will be called and the file will be created before executing the SetupDb function.
13 replies
CC#
Created by Rofus-_- on 10/28/2023 in #help
❔ Big Problem in C# plz someone help
now if someone wants the hole code then tell me and i will edit some stuff just because i am going to make this something that is privet, because the code is done but i needed to make it work and while doing it does things happend, but just tell me if you want the code and i will give you it (or send it here)
9 replies