"error CS1501: No overload for method `Add' takes `2' arguments"
I have been trying to build the following Text Adventure and have reached an error that I cannot figure out how to resolve. The error is as follows : 'Assets/My_Scripts/MH_Script.cs(19,23): error CS1501: No overload for method Add' takes
2' arguments'
and here is MH_ScriptManager:
Can somebody please explain to me what I am doing wrong, and how I can go about resolving this error in the future. I have only been coding for a month, it's fun but very meticulous.
please post the actual code, NOT screenshots. if somebody trying to help you needs to test the code, they're unlikely to type it in ;)
however, the error looks valid - there is no .Add
in List
which accepts 2 arguments - are you trying to create a Dictionary
?
Sorry about that and no I am not trying to create a dictionary. I am trying to make a list "sList" hold two different string values, one that holds the gamestate and the other that holds the states corresponding text. However I cannot seem to overload the method Add, I've done a bunch of research but I am either not looking in the right place or I am just not understanding what I have to do.
Your answer
Follow this Question
Related Questions
Dynamic List update 0 Answers
How do I create an array for sounds? 1 Answer
Why is my List adding to same array object again and again in update? 1 Answer
How to fix CS0246 error 1 Answer
How to recreate a puzzle like this. 0 Answers