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
 

Argument 1 Missing or nil. No idea what directly caused it.

Previous Thread :: Next Thread 
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
08 Mar 2015 03:54 AM
Testing my game online (The "Play" Button).
I always look in the server console for scripting errors.
I see an error:

"Argument 1 Missing or nil"

in this line:

mm.Text = DataStore:GetAsync(key)

While the whole script looks like this:

local mm = Instance.new("Message", workspace)
local DataStore = game:GetService("DataStoreService"):GetDataStore("Coins")


game.Players.PlayerAdded:connect(function(player)
key = "user_" .. player.userId
DataStore:UpdateAsync(key, function(oldValue)
local newValue = oldValue or 0
newValue = newValue + 5
return newValue
end)
end)

repeat wait()
if _G.gameFinished == true then
DataStore:UpdateAsync(key, function(oldValue)
local newValue = oldValue or 0
newValue = newValue + 20
return newValue
end)
end
mm.Text = DataStore:GetAsync(key)
until 1 == 0

I am very new to data stores...
Report Abuse
Intern33t is not online. Intern33t
Joined: 19 Nov 2010
Total Posts: 1530
08 Mar 2015 04:02 AM
Sorry, did something TOTALLY wrong. Fixing it myself!
Ignore this thread!
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