From 94ea14013ad3743ce3f6aca428dc47cc84736740 Mon Sep 17 00:00:00 2001 From: gurpreetsinghmatharoo Date: Fri, 23 Feb 2024 15:19:06 +0530 Subject: [PATCH] [General] Document that load_csv only loads strings; update the example https://github.com/YoYoGames/GameMaker-Bugs/issues/4778 --- .../File_Handling/Encoding_And_Hashing/load_csv.htm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/load_csv.htm b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/load_csv.htm index 91cf5f24f..a1db19e6d 100644 --- a/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/load_csv.htm +++ b/Manual/contents/GameMaker_Language/GML_Reference/File_Handling/Encoding_And_Hashing/load_csv.htm @@ -4,7 +4,7 @@ load_csv - + @@ -18,6 +18,7 @@

load_csv

This function will load a CSV format file and convert it into a DS grid, returning the unique ID value for the grid created.

Your CSV file should follow the CSV specification. If your CSV syntax is not correct, you will get unexpected results on loading the file.

+

This will load each cell as a string, even if it only contains numbers. Use the function real to convert a string into number.

 

Syntax:

load_csv(filename)

@@ -30,14 +31,14 @@

Syntax:

filename - String + String The name of the file to open (as a string)

 

Returns:

-

DS Grid ID

+

DS Grid

 

Example:

file_grid = load_csv("spreadsheet.csv");
@@ -49,7 +50,7 @@

Example:

{
    for (var j = 0; j < hh; j++;)
    {
-         draw_text(xx, yy, string(file_grid[# i, j]));
+         draw_text(xx, yy, file_grid[# i, j]);
        yy += 32;
    }
    yy = 32;