#How can i print multiple return values

1 messages · Page 1 of 1 (latest)

wheat sierra
#

RemoteFunction.new("CreateField", function(player, ID, FieldName, FieldLoc, FieldLogoId)
    local CheckOwner = getGroupInfo(ID)

    if CheckOwner.Owner.Id == player.UserId then
        local filteredName, nameHasHash = CheckText(FieldName, player)
        local filteredLoc, locHasHash = CheckText(FieldLoc, player)

        local IsNameGood = not nameHasHash
        local IsLocGood = not locHasHash

        -- If either is bad, return early
        if not IsNameGood or not IsLocGood then
            return false, IsNameGood, IsLocGood, filteredName, filteredLoc, FieldLogoId
        end

        warn("Filtered Name:", filteredName)
        warn("Filtered Location:", filteredLoc)
        warn("Logo ID:", FieldLogoId)

        -- Store in DataStore or do logic
        local GetData = LeagueFields:GetAsync(ID)
        -- ...rest of your logic

        return true, true, IsLocGood, filteredName, filteredLoc, FieldLogoId
    end
end)


thats server

FieldCreator.GroupCreateConfirm.TextButton.MouseButton1Click:Connect(function()
    if CurrentTab == "CreatingField" then
        
        local success, isNameGood, isLocGood, name, loc, logoId = CreateField:Fire(CurrentGroup, FieldCreator.Frame.FieldName.TextBox.Text,FieldCreator.Frame.FieldLoc.TextBox.Text, FieldCreator.Frame.FieldLogo.TextBox.Text )
        
        if success then
            print(isNameGood)
            print(isLocGood)
        end
    end
end)

this local
why wont it print all my stuff
just prints
true andnil

#

06:14:01.583 Firing - Server - Test:4
06:14:01.584 Failed to load sound rbxassetid://128063391627469: Asset is not approved for the requester - Studio
06:14:01.585 ▶ Failed to load sound rbxassetid://126232431011527: Asset is not approved for the requester (x2) - Studio
06:14:01.834 ▶ Warning: The script 'ClientExample' with a non-legacy RunContext is parented to a container 'StarterGui', which will cause it to run multiple times. To avoid unintended behavior, consider setting the RunContext to 'Legacy', disabling the script, or moving it to a different location. (x2) - Studio
06:14:02.098 Failed to load sound rbxassetid://128063391627469: Asset is not approved for the requester - Studio
06:14:02.098 ▶ Failed to load sound rbxassetid://126232431011527: Asset is not approved for the requester (x2) - Studio
06:14:03.849 ▶ {...} - Server - Importer:19
06:14:03.937 0 - Client - LocalScript:28
06:14:04.030 1 35506975 2 - Server - Test:13
06:14:04.030 2 16450804 1 - Server - Test:13
06:14:06.064 Done - Client - LocalScript:313
06:14:09.748 3 - Client - LocalScript:882
06:14:09.748 HomeTab - Client - LocalScript:883
06:14:09.748 FieldTab - Client - LocalScript:884
06:14:09.748 3 - Client - LocalScript:891
06:14:12.762 16450804 - Client - LocalScript:898
06:14:12.911 HE HIM - Server - LeagueSystem:306
06:14:12.946 true - Client - LocalScript:823
06:14:12.946 CreateField - Client - LocalScript:828
06:14:12.946 done - Client - LocalScript:836
06:14:14.566 333 - Client - LocalScript:865
06:14:16.861 Filtered Name: - Server - LeagueSystem:368
06:14:16.862 Filtered Location: - Server - LeagueSystem:369
06:14:16.862 Logo ID: - Server - LeagueSystem:370
06:14:17.031 true - Client - LocalScript:813
06:14:17.031 nil - Client - LocalScript:814

tawny veldt
#

print(1,2,3)

wheat sierra
tawny veldt
wheat sierra
#

i thought success was gonna print wether it passed or not cause im done

#

instead success was the value i returned

wheat sierra
signal quartz
#

if you're using a standard signal implementation that is