#Https/ Script issue

48 messages · Page 1 of 1 (latest)

tropic shoal
#

ata = {}
HttpService = game:GetService("HttpService")

function Data:GetSpreadsheet(Key)
if not Key or Key == "" then return "" end

local success, result = pcall(function()
    local GetData = HttpService:GetAsync("https://docs.google.com/spreadsheet/tq?key="..Key, false)
    local StartLocation = string.find(GetData,"setResponse")+12
    local EndLocation = string.len(GetData)-2
    local JsonData = string.sub(GetData, StartLocation, EndLocation)
    return HttpService:JSONDecode(JsonData)
end)

if not success then
    warn(result)
    return ""
else
    return result
end

end

function Data:ToArray(spreadsheet, columnScheme)
local tab = {}

pcall(function()
    for i = 1, #spreadsheet.table.rows do
        local rowTab = {}
        local columns = spreadsheet.table.rows[i].c
        for j = 1, #columns do
            local index = j
            if columnScheme == "Alphabetical" then
                index = spreadsheet.table.cols[j].id
            elseif columnScheme == "Labels" then
                index = spreadsheet.table.cols[j].label
            end
            if columns[j] then
                rowTab[index] = columns[j].v
            end
        end
        tab[i] = rowTab
    end
end)

return tab

end

function Data:SearchData(Array, columnOneName, columnOneValue, columnTwoName)
local columnTwoValue = nil
for i = 1, #Array do
for j, v in pairs(Array[i]) do
if j == columnOneName and v == columnOneValue then
for j, v in pairs(Array[i]) do
if j == columnTwoName then
columnTwoValue = v
end
end
end

    end
end
return columnTwoValue

end

return Data

#

theres the code

#

i think i just need help witht he spreadsheet

halcyon jackal
zenith night
# tropic shoal ata = {} HttpService = game:GetService("HttpService") function Data:GetSpreadsh...
ata = {}
HttpService = game:GetService("HttpService")

function Data:GetSpreadsheet(Key)
    if not Key or Key == "" then return "" end
    
    local success, result = pcall(function()
        local GetData = HttpService:GetAsync("https://docs.google.com/spreadsheet/tq?key="..Key, false)
        local StartLocation = string.find(GetData,"setResponse")+12
        local EndLocation = string.len(GetData)-2
        local JsonData = string.sub(GetData, StartLocation, EndLocation)
        return HttpService:JSONDecode(JsonData)
    end)
    
    if not success then
        warn(result)
        return ""
    else
        return result
    end
end

function Data:ToArray(spreadsheet, columnScheme)
    local tab = {}
    
    pcall(function()
        for i = 1, #spreadsheet.table.rows do
            local rowTab = {}
            local columns = spreadsheet.table.rows[i].c
            for j = 1, #columns do
                local index = j
                if columnScheme == "Alphabetical" then
                    index = spreadsheet.table.cols[j].id
                elseif columnScheme == "Labels" then
                    index = spreadsheet.table.cols[j].label
                end
                if columns[j] then
                    rowTab[index] = columns[j].v
                end
            end
            tab[i] = rowTab
        end
    end)
    
    return tab
end

function Data:SearchData(Array, columnOneName, columnOneValue, columnTwoName)
    local columnTwoValue = nil
    for i = 1, #Array do
        for j, v in pairs(Array[i]) do
            if j == columnOneName and v == columnOneValue then
                for j, v in pairs(Array[i]) do
                    if j == columnTwoName then
                        columnTwoValue = v
                    end
                end
            end
            
        end
    end
    return columnTwoValue
end

return Data
#

i just formating

#

ignore

zenith night
#

nothing

#

just formated

tropic shoal
zenith night
#

from text to color

tropic shoal
#

i figured out i js need help with the correct sheet on google

#

That will transfer data

#

Idk if it’s code

#

But im down to hire someone

#

If I can get it done with

zenith night
#

well

#

i know 1 api

#

but its with limit 1000 module uses/ week

tropic shoal
zenith night
#

so

broken plinth
#

i hv heard about like

#

someone saying gemini

tropic shoal
#

like im new to this does it like make sheets

zenith night
broken plinth
#

gemini api

tropic shoal
#

i got this given by a friend to make a league for baseball

zenith night
zenith night
tropic shoal
#

I know a bit about scripting

tropic shoal
zenith night
#

idk why not

#

which one

broken plinth
#

i dont learn about https

#

so i cant help

zenith night
tropic shoal
broken plinth
tropic shoal
#

i just need see what you do

#

General 1?

#

I mean 2

zenith night
#

yup

broken plinth
#

imma join too

#

i need private lessons from cat