LinurS
|
  |
| Joined: 19 Jul 2017 |
| Total Posts: 6 |
|
|
| 11 Aug 2017 06:03 AM |
On this line I get the error attempt to index a number value, I've tried what I could do but nothing would work any help? Here is the line:
stock.Value = tostring(stockdatastore:GetAsync("stockowned_"..plr.UserId.."_"..i)[1])
https://www.roblox.com/groups/group.aspx?gid=2988707 |
|
|
| Report Abuse |
|
|
Dadosayhi
|
  |
| Joined: 05 Jul 2011 |
| Total Posts: 272 |
|
|
| 11 Aug 2017 06:53 AM |
| your data is saved as a number instead of a table |
|
|
| Report Abuse |
|
|
sonihi
|
  |
| Joined: 27 Jun 2009 |
| Total Posts: 3655 |
|
|
| 11 Aug 2017 06:54 AM |
Is stock a number value? then you should do
stock.Value = tonumber(stockdatastore:GetAsync("stockowned_"..plr.UserId.."_"..i)[1])
|
|
|
| Report Abuse |
|
|
LinurS
|
  |
| Joined: 19 Jul 2017 |
| Total Posts: 6 |
|
|
| 11 Aug 2017 06:57 AM |
yes, I've figured out what was wrong. I was saving it wrongly. I was doing stockdatastore:SetAsync("stockowned_"..plr.UserId.."_"..i)[1]) = somevalue
https://www.roblox.com/groups/group.aspx?gid=2988707 |
|
|
| Report Abuse |
|
|