Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script not running a for loop?

Asked by
Tedfat 10
8 years ago
function run()
            miguild = GuildID[house2:GetAsync("Joined")]
            script.Parent.GuildName.Text = miguild


    player:WaitForDataReady()
    if game:GetService("DataStoreService"):GetOrderedDataStore("Members",miguild):GetSortedAsync(false,50,0,2147483647) ~= nil then
    c_v = game:GetService("DataStoreService"):GetOrderedDataStore("Members",miguild):GetSortedAsync(false,50,0,2147483647)
    data = c_v:GetCurrentPage()
    for k,v in pairs(data) do
        print("whomp")
        if v ~= nil then
            local name = v.key
            local kills = v.value
            local current = template:clone()
            create(k,name,kills)

        end
    end
    end
    print("woop")
end

changed a portion into a function

For "for k,v..." and everything inside does not run and does not output "whomp"

1 answer

Log in to vote
-1
Answered by 8 years ago

You did not call your function.

0
This is a portion of my script changed into a function. Tedfat 10 — 8y
Ad

Answer this question