Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Mrpaolosarino |
I know that
var Q = "qwerty"
print(Q[5])
it will print y
but what if the string is always changing:
var Q = "qwerty"
func ready():
Q = "ok"
print(Q[5])
This will return an error of Invalid get index ‘5’ (on base: ‘String’).
I want to make it ignore if it doesn’t have that index and just return null. Anyone??