If you're accessing `counter` from a member function in the same class that counter is declared in, then you can access it without a type identifier. Otherwise you need to put the class name before you can access it.
And I always use `.ToString()`. I don't know if `js` has an implicit conversion, but C# requires you to explicitly convert one to the other.
pietext.text = "You missed " + ClassName.counter.ToString() + " out of 10 questions";
`ClassName` will be the name of the script file (Unity automagically creates a class with the same name as the script file).
↧