I am currently trying to create a Scrabble Game word scorer. So far, it has been going well, but I've run into an issue. I have one main row (A2:AP2) that contains formulas and calculates the word score. I want to get the values from that entire row each time someone submits a word, and create a record of all the words someone has submitted.
The code below starts that process, but whenever i run the script, it appends "[Ljava.lang.Object;@536f3e11" instead of the actual array values.
var p1ScoreCalc = p1Sheet.getRange('A2:AP2').getValues();
//---Array for score records---\\
var array = []
//---Checks if submit is checked--\\
if(submitCheck == 1){
//---Checks for what player is submitting---\\
if(playerCheck === "P1"){
array.push(p1ScoreCalc);
testSheet.appendRow(array);
}
}
I cannot figure out why this is happening. This is not my first time using appendRow()
, and i cannot seem to find what I am doing wrong. I could be missing something very simple.
Here is the spreadsheet link for reference: https://docs.google.com/spreadsheets/d/1pgsE_OtO8MEqoVcGH5csQ43BOm9kx5XbagwhNTpfSk4/edit?usp=sharing