Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

DataStoreError, makes no sense?

I have no clue why this is erroring if anyone could help me, would be much appreciated.

-- This is a OrderedDataStore 

function copInfo:createProfile(p, username, password)
	local newTbl = {username, password}
	newTbl = http:JSONEncode(newTbl)
	pcLoginDs:SetAsync(p.UserId, newTbl) -- LINE 178
end

copInfo:createProfile(plrs:WaitForChild("papasherms"), "test1", "test2") -- LINE 181

ERROR: 103: string is not allowed in DataStore Stack Begin Script 'ServerScriptService.mainScript', Line 178 - method createProfile Script 'ServerScriptService.mainScript', Line 181 Stack End

2 answers

OrderedDataStores can't store strings, use a DataStore instead.

Replace the pcLoginDs variable with:

local pcLoginDs = game:GetService('DataStoreService'):GetDataStore('the name you put for your datastore')

This discussion is preserved as it was. New answers, comments, and votes are closed.