Problem with Pokemon Game for school
Hello, I have a problem while creating a pokemon battle game as a school project and I can't figure out how to fix it is there anyone that can help me?
38 Replies
Lots of people could help you, but you need to be more specific about what problem you are having.
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
I can't create enough files on that website it has multiple classes. Is there a way I can just put my visual studio solution here
?
No, please avoid posting the entire codebase
Only paste the code that has the issue and important code that is attached to it
If you need more code to understand it, ask me and I will send it
As it says
It expects arguments
A name, a type, etc.
but if I try to add arguments it won't take any
Huh?
Send the Move class please
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
What exactly isnt working?
the whole program that's the problem. And I don't know why but it has 31 errors in total
And the errors are?
is there a way I can copy them all and put them here?
You can screenshot them
If you use a newer .NET version you can use Random.Shared
Otherwise you must initialize a new object of type Random
Random rand = new Random();
You must read the errors and do as it saysrandom shared still gives an error
It is not a method
It is a static property
Make a dot after Shared then check the intellisense
Shared is a shared instance of Random, it does not return a random number.
what am I looking for in the intellisense?
You tell me, what are you looking for?
that it generates a random number and if it is lower than Accuracy it gos into the if statement
Then find a method which generates a random number
it said this return a non negative integer and then I get this error
How do you call a method?
Accuracy is an integer (32-bit integer), why do you need a long (64-bit integer)
intellisense didn't give me a 32 bit option
Are you sure?
What does Next method say?
that gives also an error
I have to drive home now so I won't be able to answer for a moment, but I already want to thank you in advance for helping me out
It still is a method
Anything you call needs (2) certain characters
this works now thank you
but how do I fix this?