I’ve been working with a modified version of the KeyCombo script, and converting it to C# for my project. As with KeyCombo, it requires an array of strings to be passed, which will be compared with the input from users. However, I’m having issues with it in C#. I’m pretty sure it’s an issue with the string.
Here is the constructor for the KeyCombo class script
public KeyCombo(string[] b){
buttons = b;
}
here is one of the places i use the keyCombo class
KeyCombo dash = new KeyCombo(["left", "left"]);
error CS1526: A new expression requires () or [ ] after type
Internal compiler error during parsing, Run with -v for details
I’ve been getting these two errors. I’m not entirely sure what the second means. I’ve put parenthesis around the declaration, so im not sure what the issue is.
Yes, that’s the actual code, and that is the error I’ve been getting. Should the file location be set up as a string (" ")?
Besides that though, I think I have a bigger problem.
Hey I’m pretty new to this and I saw that people were getting stuck with this. I’ve tried to fix the line of code that I’ve been getting errors from but so far nothing seems to have worked, I’m using C# and this is the line that’s giving me grief:
Vector3 moveVector = new Vector3.zero;
Usually I’d be using the FPS prefab but I wanted to create my own movement script and after following an online tutorial exactly I still came across this error.