You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Updated tutorial_gdscript_efficiently (markdown)
@@ -248,15 +248,15 @@ var d = {
|
||||
}
|
||||
|
||||
print("Name: ", d.name, " Age: ", d.age ) # used "." based indexing
|
||||
d.name="caroline" #works for assignment
|
||||
|
||||
# indexing
|
||||
|
||||
d.nother="rebecca" #this doesn't work (use syntax below to add a key:value pair)
|
||||
d["mother"]="rebecca" #this works
|
||||
|
||||
d.name="caroline" # if key exists, assignment does work, this is why it's like a quick struct.
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user