Harlowe 3.3.9
Hello, I’m working on a game and currently trying to send play results to a google sheet. I found John Stewart’s blog post and went through the steps. Everything seems like it should be working but no data is being received by the google sheet. (the sheet is named correctly, which seems to have been a common error in the past)
Is anyone able to tell from the below code what the issue might be?
I’m worried that since the time of that blog post, Google api has changed to make this process impossible now.
Oh, and currently hosting on borogove dot io, in case that’s a factor.
Grateful for the help!
<script src=”jquery-3.3.1.min.js”>
</script>
<script>
var sendData = JSON.stringify({
"Popcorn": harlowe.State.variables['Popcorn'],
"Innovation": harlowe.State.variables['Innovation'],
"Logline": harlowe.State.variables['Logline'],
"Budget": harlowe.State.variables['Budget'],
"FirstFilm": harlowe.State.variables['FirstFilm'],
"SecondFilm": harlowe.State.variables['SecondFilm'],
"EnigmaEnding": harlowe.State.variables['EnigmaEnding'],
"BladeRunnerEnding": harlowe.State.variables['BladeRunnerEnding']
});
$.ajax({
url:"https://script.google.com/macros/s/AKfycbz8LQiKQO-kOd4dNeWjH64EvEh_SNCBXE_ZKIwXaOyfHrjfa7eNM4bLTtPprhfq4yiH/exec",
method:"POST",
dataType: "json",
data: sendData
}).done(function() {});
</script>