浏览代码

Update gdscript_basics.rst

Vikram1323 7 年之前
父节点
当前提交
5838266e00
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      getting_started/scripting/gdscript/gdscript_basics.rst

+ 2 - 2
getting_started/scripting/gdscript/gdscript_basics.rst

@@ -488,8 +488,8 @@ Starting with Godot 2.1, indices may be negative like in Python, to count from t
     var b = arr[1] # This is 2.
     var b = arr[1] # This is 2.
     var c = arr[arr.size() - 1] # This is 3.
     var c = arr[arr.size() - 1] # This is 3.
     var d = arr[-1] # Same as the previous line, but shorter.
     var d = arr[-1] # Same as the previous line, but shorter.
-    arr[0] = "Hi!" # Replacing value 1 with "Hi".
-    arr.append(4) # Array is now ["Hi", 2, 3, 4].
+    arr[0] = "Hi!" # Replacing value 1 with "Hi!".
+    arr.append(4) # Array is now ["Hi!", 2, 3, 4].
 
 
 GDScript arrays are allocated linearly in memory for speed.
 GDScript arrays are allocated linearly in memory for speed.
 Large arrays (more than tens of thousands of elements) may however cause
 Large arrays (more than tens of thousands of elements) may however cause