generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Key too long

Previous Thread :: Next Thread 
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
27 Feb 2015 03:00 PM
While playing with my DataStores, it errored me a "Key too long"

This is the key:

local playerProductKey = "player_"..receiptInfo.PlayerId.."_purchase_"..receiptInfo.PurchaseId

player_ = 6 characters
PlayerId - usually 7 characters
_purchase_ = 10 characters
PurchaseId = 8 characters
---
31 characters

The DataStore wikipage says a Key's character limit is 50,

what? ;l
Wot am I doing incorrectly?
Report Abuse
gerov is not online. gerov
Joined: 05 Feb 2011
Total Posts: 5504
27 Feb 2015 03:13 PM
Maybe it sticks a UUID at the end in the background...

Why don't you take a seat over there?
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
27 Feb 2015 03:14 PM
Hmm, explain ;3
Report Abuse
gerov is not online. gerov
Joined: 05 Feb 2011
Total Posts: 5504
27 Feb 2015 03:15 PM
A UUID is a random string of numbers and letters that high level languages (Java, C++, etc) use to make a something unique.

UUID = Universally unique identifier

Why don't you take a seat over there?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Feb 2015 03:16 PM
It's not that much worse to just save the numbers.

Id1 .. " " .. Id2

And then you can still get both Ids with

Id1, Id2 = Key:match("(%d+) (%d+)")
Report Abuse
gerov is not online. gerov
Joined: 05 Feb 2011
Total Posts: 5504
27 Feb 2015 03:17 PM
My UUID thing is just a theory though.

Why don't you take a seat over there?
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
27 Feb 2015 03:42 PM
I just used Roblox's example because it seemed well-ordered xD

Thanks.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image