[quote] [quote=“MrNicNac” post=138423]This is great and all, but what is the down-to-efficient point? SQL databases have way more durability, can be queried faster and in multiple ways, and can be exported into spreadsheets for viewability purposes.
May be cool, but I feel SQL database management is much more… modern… [/quote]
The point is that it serves it’s purpose of storing data, doesn’t need to be exported because it already is there for you to view and can retrieve data from it. I don’t know what you mean by durability, but this has also zero downtime and no need to worry for SQL injection. Also it requires little to no knowledge of scripting and can be done almost instantaneous.[/quote]
Fair enough, but if you are even worrying about SQL injection… then you might be 8 years behind modern web standards.[/quote]
While I agree with you that an SQL database is a much smoother and more flexible option…
This allows you to write JS (without node.js) instead of PHP/Java/C-Derivative. Which is great for this simple purpose of just simply moving data back and forth.
The major factor of why I’m considering this alternative is just purely the fact that it’s free hosting. I don’t have a purpose for a website outside of ROBLOX, and I don’t see a point in paying ~5$ a month on top of BC costs.
[spoiler][code]
local hs = game:GetService(“HttpService”)
local hsEntry1 = “”
local hsEntry2 = “”
local hsKey = “”
local hsForm = “”
local hsHost = “https://docs.google.com/”
local function logSheet(var1, var2)
local hsLink = hsHost…“forms/d/”…hsForm…“/formResponse?entry.”
…hsEntry1…“=”…var1…“&submit=Submit&formkey=”
…hsKey…“&entry.”…hsEntry2…“=”…var2…“&ifq”
– Upload onto Google Sheets!
– print(hsLink)
hs:PostAsync(hsLink, “”, 2)
end
function onChatted(msg, recipient, speaker)
logSheet(speaker.Name, msg)
end
function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end
How would one go about updating a certain cell and not adding a new line?
Assuming we are maintaining a table, and the table consists of a name followed by a number, and is always ordered by name. When put into google sheets all of the current cells would just be replaced with the new values.
Has anyone figured out if there is a way to read from spreadsheets using HttpService:GetAsync? I looked around some google APIs but I couldn’t get anything going.
Yeah, I’ll be providing some details on that (unless someone wants to go ahead)
[quote] How would one go about updating a certain cell and not adding a new line?
Assuming we are maintaining a table, and the table consists of a name followed by a number, and is always ordered by name. When put into google sheets all of the current cells would just be replaced with the new values.
Hope you like my visualization
[/quote]
There is indeed a way to update cells, however I’m not exactly sure if it works in your case.
Does Google Sheets have automatic data organization for things like average, max, min, current position in rankings (a function of row after ordering, I suppose), highest/lowest n number of values, and the keys for these values. (e.g. who are the top 10 players, where is suchandsuch in the leaderboard, what is the average score, etc.)
There is no particular order to how params can be specified. You can put more entries after the end of the string, in the middle, or in the beginning- it doesn’t matter. All the params get sent to the server at the same time, so as long as its present the server won’t care what order it’s in.
Now I’m not entirely sure about the format of Google Sheets, but you should be able to copy and paste the one from either entries and have no problem.
This still works. I managed to do it a few weeks ago. Chances are the URL is slightly incorrectly formatted. I had to play around for a few minutes for it to work.