Thanks. When you say "read that cell of the table data before selecting what spreadsheet to use" do you mean use a different "API" script for every student/spreadsheet, or is there an easier way to set it up? That doesn't sound right so I presume I'm misunderstanding entirely. I'd presumed I'd be able to have the script look at a cell of the spreadsheet and then push it to a different spreadsheet depending on what it found.
Just thought I'd mention that that Google Sheets script seems to be working beautifully. Finally started to replace Appformative with Google Sheets in the games and it has several very noticable advantages. One is that I can name the sheets according to student names so their raw data can be easily located and looked at. Another I wasn't expecting is that I can send from one table and receive to another (I've not done so yet but it seems to be an option). Thanks @adent42 for that script, it's going to be a huge help! Fingers crossed we don't butt up against the limits imposed by Google!
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
@adent42 These are the rules I'm using to pull data from my Google Sheet. It works about 1/2 the time but the callback value is only 0 or 1. It never returns -1 even if it doesn't pull any data.
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
edited July 2020
Okay, if I intentionally give it a bad script URL, I do get a -1 callback. But otherwise, I'm getting a 1 so it's connecting to the sheet/script but it's not updating the table in GameSalad. I removed the firstRun condition and tried it with and without the Timer. Same issue.
Edit: Aha! With @adent42's help, I was able to determine that the table ID in the GameSalad project wasn't the same as in my earlier test project. I renamed the sheet (tab) to match the ID inside of the GameSalad project file structure.
I use Gamesparks because that is what I know, it is very open and I have multiple free instances, but you can do what I am doing with any NOSQL/Mongo DB with some sort of javascript engine.
I'm poking around with this and wanted to ask if anyone has GS working with google sheets recently? I took a pass and couldn't get it to work but haven't really dived into it yet -- my google sheet wouldn't generate a new sheet, although its likely the scripts in this thread are just outdated?
adent42Key Master, Head Chef, Executive Chef, Member, PROPosts: 3,159
I'd need to look at the code again, but I think I made the script to use existing sheets rather then generate new ones, but I could be wrong.
I'm getting a -1 callback error when doing either post or get... but in the google sheet side, i can see the function is running (see attached, this shows up in the Apps Script execution history after running the gamesalad behavior a few times).
But that -1 callback error means something isn't talking, right?
Anyway, I might check out some other alternatives.
Comments
Thanks. When you say "read that cell of the table data before selecting what spreadsheet to use" do you mean use a different "API" script for every student/spreadsheet, or is there an easier way to set it up? That doesn't sound right so I presume I'm misunderstanding entirely. I'd presumed I'd be able to have the script look at a cell of the spreadsheet and then push it to a different spreadsheet depending on what it found.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Just thought I'd mention that that Google Sheets script seems to be working beautifully. Finally started to replace Appformative with Google Sheets in the games and it has several very noticable advantages. One is that I can name the sheets according to student names so their raw data can be easily located and looked at. Another I wasn't expecting is that I can send from one table and receive to another (I've not done so yet but it seems to be an option). Thanks @adent42 for that script, it's going to be a huge help! Fingers crossed we don't butt up against the limits imposed by Google!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I finally got this to work!!!
Not totally consistently but it does work sometimes.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@adent42 These are the rules I'm using to pull data from my Google Sheet. It works about 1/2 the time but the callback value is only 0 or 1. It never returns -1 even if it doesn't pull any data.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Okay, if I intentionally give it a bad script URL, I do get a -1 callback. But otherwise, I'm getting a 1 so it's connecting to the sheet/script but it's not updating the table in GameSalad. I removed the firstRun condition and tried it with and without the Timer. Same issue.
Edit: Aha! With @adent42's help, I was able to determine that the table ID in the GameSalad project wasn't the same as in my earlier test project. I renamed the sheet (tab) to match the ID inside of the GameSalad project file structure.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hi. Has anyone made a full step by step guide on how to set this all up from scratch?
hapoy holidays 🎂
I use Gamesparks because that is what I know, it is very open and I have multiple free instances, but you can do what I am doing with any NOSQL/Mongo DB with some sort of javascript engine.
, I'm getting a 1 so it's connecting to the sheet/script but it's not updating the table in GameSalad. omegle
@elwynmuller You can check my refreshed 2020 / 2021 videos in this thread. I believe at least 2 people are using them:
https://forums.gamesalad.com/discussion/98202/gamesalad-login-with-gamespark#latest
I'm poking around with this and wanted to ask if anyone has GS working with google sheets recently? I took a pass and couldn't get it to work but haven't really dived into it yet -- my google sheet wouldn't generate a new sheet, although its likely the scripts in this thread are just outdated?
I'd need to look at the code again, but I think I made the script to use existing sheets rather then generate new ones, but I could be wrong.
Cool. I'll try another crack at it this afternoon to see if I can it communicating.
I'm getting a -1 callback error when doing either post or get... but in the google sheet side, i can see the function is running (see attached, this shows up in the Apps Script execution history after running the gamesalad behavior a few times).
But that -1 callback error means something isn't talking, right?
Anyway, I might check out some other alternatives.