Issue with setting different spawn x y coords when starting new game

Good morning. I have a problem with my piece of codes. When I test them in-game, they seem to make the player stop and freeze, when x and y coordinates are inputted.

JavaScript:
//=============================================================================
// test.js
//=============================================================================

var Imported = Imported || {};
Imported.BNTKids_test = true;

var BNTKids = BNTKids || {};
BNTKids.test = BNTKids.test || {};
BNTKids.test.version = 1.00;
//-----------------------------------------------------------------------------
/*:
 * @plugindesc Allows you to customize what commands appear in the title screen menu.
 * 
 * @author BNTKids-Studios
 *
 * @param Spawn_Locations
 * @desc The default title command list before the below Mod Condition is met
 * @default 1,1,1|2,2,2
 *
*/


(function(){
// coordinates
BNTKids.test.locs = [];
console.log(PluginManager._parameters.test.Spawn_Locations);
var txt = PluginManager._parameters.test.Spawn_Locations;
console.log (txt);
var locs = txt.split("|");
console.log (locs);
for (var i = 0; i < locs.length; i++) {
    BNTKids.test.locs.push(locs[i].split(","));
};

//==============================
// * make Command List
//==============================
var BNTKids_test_makeCommandList = Window_TitleCommand.prototype.makeCommandList;
Window_TitleCommand.prototype.makeCommandList = function() {
    BNTKids_test_makeCommandList.call(this);
    this.makeCustomCoordinateList();
};    

Scene_Title.prototype.createCommandWindow = function() {
    this._commandWindow = new Window_TitleCommand();
    this._commandWindow.setHandler('newGame',  this.commandFirstGame.bind(this));
    this._commandWindow.setHandler('continue', this.commandContinue.bind(this));
    this._commandWindow.setHandler('options',  this.commandOptions.bind(this));
    this.addWindow(this._commandWindow);
};

Window_TitleCommand.prototype.makeCustomCoordinateList = function() {
        var list = BNTKids.test.locs; // default list   
        $dataSystem.coordlist = [];
    // Build coordinate list
    for (var i = 0; i < list.length; i++) {
        $dataSystem.coordlist[i] = [];
        var id = list[i][0];
        var x = list[i][1];
        var y = list[i][2];
           $dataSystem.coordlist[i] = {id,x,y};
 //           $dataSystem.coordlist[i] = {id};
    };
};
Scene_Title.prototype.commandFirstGame = function() {
    $dataSystem.startMapId = $dataSystem.coordlist[0].id;
    $dataSystem.startX = $dataSystem.coordlist[0].x;
    $dataSystem.startY = $dataSystem.coordlist[0].y;
    DataManager.setupNewGame();
    this._commandWindow.close();
    this.fadeOutAll();
    // Change start point.
    SceneManager.goto(Scene_Map);
};
})();

When that is set, the character will freeze and walk in place.

I can set the "StartMapId" just fine, but I cannot set the x and y coords without causing a softlock.
There is a problem here:
JavaScript:
var locs = txt.split("|");
console.log (locs);
for (var i = 0; i < locs.length; i++) {
    BNTKids.test.locs.push(locs[i].split(","));
Spoiler: explanation
You haven't converted the coordinates from string to number.
There is a problem here:

Spoiler: explanation
You haven't converted the coordinates from string to number.
Oh? It's an array.

1,1,1|2,2,2

devlog output
  1. (2) ["1,1,1", "2,2,2"]
    1. 0:"1,1,1"
    2. 1:"2,2,2"
    3. length:2
    4. __proto__:Array(0)

Where and how to convert them to numbers?

EDIT: Thanks! Nevermind, it was definately a string to number problem!

I converted it here:

JavaScript:
        var id = Number(list[i][0]);
        var x = Number(list[i][1]);
        var y = Number(list[i][2]);
You parsed it like this:
  1. Input: "1,1,1|2,2,2"
  2. Split: ["1,1,1", "2,2,2"]
  3. Split: [["1", "1", "1"], ["2", "2", "2"]]
So the actual coordinate values were still strings.

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-setting-different-spawn-x-y-coords-when-starting-new-game.177739/