loadStrings working weirdly

So I have this bit of code in preload()

function preload() {
  let gamename = "test";
  let fdat = loadStrings("games/"+gamename+".bit");
  console.log(fdat);
  fdata = fdat;
}

And the file "test.bit" reads:

block
50
110
200
200
0
255
0
floor
50
100
200
10
0
255
0

But what I get in console is an array containing the values:

"block"
"50"
"110"
"200"
"200"
"0"
"255"
"0"

Even though the file reads what is above.

The array should read:

"block"
"50"
"110"
"200"
"200"
"0"
"255"
"0"
"floor"
"50"
"100"
"200"
"10"
"0"
"255"
"0"

I have no idea why this happens, can someone explain?

Answers

Sign In or Register to comment.