From 3e4e87fb9079e6c0b314e0f4f3b42c606ce1867d Mon Sep 17 00:00:00 2001 From: zacryol <5291432-zacryol@users.noreply.gitlab.com> Date: Sat, 25 Sep 2021 19:57:29 -0600 Subject: [PATCH] Fix typo with example variable name in Dictionary docs, and fix error in C# example (cherry picked from commit 9359bee75c865a156d71bea6f0db9de33b640641) --- doc/classes/Dictionary.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 8c48699c70a..691c0ea9455 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -29,7 +29,7 @@ some_key = 42, } [/codeblock] - You can access a dictionary's values by referencing the appropriate key. In the above example, [code]points_dir["White"][/code] will return [code]50[/code]. You can also write [code]points_dir.White[/code], which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable). + You can access a dictionary's values by referencing the appropriate key. In the above example, [code]points_dict["White"][/code] will return [code]50[/code]. You can also write [code]points_dict.White[/code], which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable). [codeblock] export(string, "White", "Yellow", "Orange") var my_color var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} @@ -50,7 +50,7 @@ Finally, dictionaries can contain different types of keys and values in the same dictionary: [codeblock] # This is a valid dictionary. - # To access the string "Nested value" below, use `my_dir.sub_dir.sub_key` or `my_dir["sub_dir"]["sub_key"]`. + # To access the string "Nested value" below, use `my_dict.sub_dict.sub_key` or `my_dict["sub_dict"]["sub_key"]`. # Indexing styles can be mixed and matched depending on your needs. var my_dict = { "String Key": 5,