In php I might do something like
if(isset($array['somekey']) {
# Do something
}
How can I achieve something similar with Godot?
In php I might do something like
if(isset($array['somekey']) {
# Do something
}
How can I achieve something similar with Godot?
The has function is probably what you are looking for, if you are using GDScript :smile:
@TwistedTwigleg said: The has function is probably what you are looking for, if you are using GDScript :smile:
I've discovered "in" for dictionaries is what I'm looking for. Thanks so much for posting anyways.