✅ CS1001 error
So im working on an assignment and wrote the full code; CS1001 error seems to not want to go away. I looked it up and it seems to miss an identifier.
on line three where the error is present i have namespace written; isnt that an identifier?
49 Replies
If possible, show your code
would a screenshot suffice?
or what would you prefer?
Yeah sure
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
If your code is too long, post it to: https://paste.mod.gg/BlazeBin - aenkmzogoqag
A tool for sharing your source code with the world!
it was easier to paste the code here :p
Hahaha i can do that too, i just feel like it would be cluttery
If the code is exactly the same as you've posted, it should compile
i cant run it at all sadly
Do not use any special characters in code
by that I mean the accented O in Ovning
surprisingly this compiles on my machine
o_o
maybe i should try creating a new project or something?
But yeah, Denis is probably right
that is a general guideline for programming, and make sure to call your classes, properties, methods etc. in english
The error is referring to line 3, which is the namespace
i changed it to "Ovning" and its still not working 😮
Try creating a new project with a better name
maybe that helps
The project name shouldn't show this error
Out of curiosity, try just removing that namespace
If that keeps throwing, try using top-level statements
If that keeps throwing, ¯\_(ツ)_/¯
Hahaha i created a new project and made the name more arbitrary in english
and the error disappeared
😎 case closed
What compiled for you? I cant seem to get the code working. So i may have messed up afterall
I wish XD
The code you posted here compiles normally
oh
are you getting the same error?
I feel like im doing something wrong
because when i try to run it
maybe share a screenshot of your IDE?
it just exits
is a part of the code highlighted in red?
no errors
so it could be a logical error
or something?
im a noob when it comes to this, if it isnt apparent yet XD
ah
I see the problem
the
while
loop doesn't loop
because your myBool is negated to falseoh
and while stops looping when the boolean is false
remove the
!
it works perfectly now, thanks so much friend 😄
i sat with this for like 3 hours today lol
Compile time errors are different from runtime logical errors
Don't worry, you will sit for 3 hours over many other programming problems
compile time means the program's executable won't even be created
sometimes days even....
i see, is there any way to see those? or are they also invisible like logical errors?
Well, compile time errors are like the one you encountered earlier
CS1001
If i get paid to look for errors for hours/days/weeks/months
then i see that as a win hahaha
ooh i see
I just consulted the internet once that error number came up
but it didnt make me any wiser sadly
but im only like ~4 weeks into a beginners programming class
Yeah, it was a weird error, because on two machines it compiled with no errors
perhaps i wrote something wonky on my side hahaha or something. But im glad it got fixed and now i understand what got messed up
Thanks to both of you!!!!!!!!! ❤️ @Kouhai @Deno
Well, if everything is okay, don't forget to
/close
Will do 🙂