void PedirPass()
{
Terminal.ClearScreen();
currentScreen = Screen.Password;
Terminal.WriteLine("Elejiste el nivel " + level);
Terminal.WriteLine("Type Pass, Hint: " + password.Anagram()); // The code run until this line
SetRandomPass();
}
Is the OnUserInput method spelt correctly in your script? Does the PedirPass method get called?
Are there any error messages in your console when you run your game?
NullReferenceException means that a reference (“link”) to an instance is missing.
The best would be to remove the WM2000 script from your Hierarchy. Drag the WM2000 prefab from your Assets folder into the Hierarchy again. Assign your Hacker script to the WM2000 game object in the Hierarchy. Then run your game again.
i see you declared a variable string called password. Now you are trying to call a method password.Anagram() but the standard string probably hasnt got such method, it is just for normal strings.
I think you made a typo or got confused a bit and meant Password.Anagram() with a capital P, and not password.Anagram().
To be sure, at the spot where your code goes wrong just type Password and a dot directly after it Visual Studio or Visual Code will show you a list of options. Look if Anagram() is one of them and click on it. That way you also dont have to type so much.