Browse Source

fixed incorrect variable in C# code example

save_game is not the variable used in the C# tab
TheTrainDoctor 5 years ago
parent
commit
b9072edace
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tutorials/io/saving_games.rst

+ 1 - 1
tutorials/io/saving_games.rst

@@ -265,7 +265,7 @@ load function:
         // it represents.
         // it represents.
         saveGame.Open("user://savegame.save", (int)File.ModeFlags.Read);
         saveGame.Open("user://savegame.save", (int)File.ModeFlags.Read);
 
 
-        while (saveGame.GetPosition() < save_game.GetLen())
+        while (saveGame.GetPosition() < saveGame.GetLen())
         {
         {
             // Get the saved dictionary from the next line in the save file
             // Get the saved dictionary from the next line in the save file
             var nodeData = new Godot.Collections.Dictionary<string, object>((Godot.Collections.Dictionary)JSON.Parse(saveGame.GetLine()).Result);
             var nodeData = new Godot.Collections.Dictionary<string, object>((Godot.Collections.Dictionary)JSON.Parse(saveGame.GetLine()).Result);