Sasayaki
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 33868 |
|
|
| 16 Aug 2015 12:22 PM |
10:19:29.170 - Value is not allowed 10:19:29.172 - Script 'ServerScriptService.EnterScript', Line 165 10:19:29.173 - Stack End
CORRESPONDING CODE:
total.Changed:connect(function() ds3:UpdateAsync(plr.userId, function(old) return total.Value end) if wins.Value >= 5 then ds5:UpdateAsync(plr.userId, function(old) <---- LINE 165. if total.Value == 0 then return wins.Value*100000 else return math.floor(wins.Value/total.Value*10000+.5)/10000 end end) end end)
IT MAKES NO SENSE BECAUSE ALMOST THE EXACT SAME CODE WORKS 3 LINES EARLIER. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 16 Aug 2015 12:24 PM |
I can assure that I have absolutely no idea. Perhaps you should try SetAsync instead?
Hello World! |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 12:25 PM |
| If you are not updating the value based on the old value, why are you even using UpdateAsync? |
|
|
| Report Abuse |
|
|
Intern33t
|
  |
| Joined: 19 Nov 2010 |
| Total Posts: 1530 |
|
|
| 16 Aug 2015 12:29 PM |
"Value is not allowed"
The value you are trying to set is obviously not allowed then.
If it's an allowed value, it might be out of bounds.
The maximum allowed characters is either 50, 64 or 65535 (am not sure right now).
In case "wins.Value*100000" or "math.floor(wins.Value/total.Value*10000+.5)/10000" are strings, you might be exceeding characters.
If you want them actually to be numbers, try "tonumber()". |
|
|
| Report Abuse |
|
|
Sasayaki
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 33868 |
|
|
| 16 Aug 2015 12:32 PM |
They're numbers.... And they are in no way exceeding the max character limit considering I literally just made the code round off to 5 digits. And I'll try SetAsync. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2015 12:52 PM |
| try tostring(plr.userId) as the key |
|
|
| Report Abuse |
|
|
Sasayaki
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 33868 |
|
|
| 16 Aug 2015 12:54 PM |
| resolved issue, it was that I needed to make them integers (ordereddatastore) |
|
|
| Report Abuse |
|
|