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: OrderedDataStore question

Previous Thread :: Next Thread 
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
14 Feb 2016 11:58 PM
If I'm correct, in this code:

ODS:SetAsync("RecurringNightmare", 0)

RecurringNightmare is the key and 0 is the value. If this is the case, then please correct me: else consider the following..

I return this key to a localscript with a remote function and it receives the key correctly. Why does it error when I try to reference key.value? Do I need to return the value too?
Report Abuse
12103net is not online. 12103net
Joined: 08 Jul 2013
Total Posts: 350
15 Feb 2016 12:01 AM
does it say it's nil? try making a table and returning that
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
15 Feb 2016 12:13 AM
it does say it's nil but it is in a table. keys is the name of the table and key is the key returned (in this case, "RecurringNightmare")

function ReturnUser.OnServerInvoke(player, key)
print 'server invoked'
for i,v in pairs(keys) do
if v == key then
-- return key
return ODS:GetAsync(key)
end
end
end
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
15 Feb 2016 07:54 AM
b
Report Abuse
PrincessViolaRiku is not online. PrincessViolaRiku
Joined: 23 Aug 2015
Total Posts: 17
15 Feb 2016 07:57 AM
Where is the localscript?


Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
15 Feb 2016 08:06 AM
StarterGui...
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