string variable nondefined?
I have a string variable which is used as a parameter in an event via pygame and I want to say that its defined later but I don't know how so it just shows and error when I try to run it. so s there some type command I can use to make it wait until it attempts to define it. I have a few if statements for defining it and I pressing keys changes the value.
You can declare the variable with no value with
variable = None
and then set it to a value later with
variable = "yourvariablehere”
click the checkmark next to my name if this helped!