5d31ce4b16
Which is useful when the key isn't a valid identifier, such as keys with spaces or numeric keys.
9 lines
210 B
GDScript
9 lines
210 B
GDScript
func test():
|
|
var lua_dict = {
|
|
a = 1,
|
|
"b" = 2, # Using strings are allowed too.
|
|
"with spaces" = 3, # Especially useful when key has spaces...
|
|
"2" = 4, # ... or invalid identifiers.
|
|
}
|
|
|
|
print(lua_dict)
|