Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
| |
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 30 Jun 2013 10:34 AM |
local Prod = game:GetService("MarketplaceService"):GetProductInfo(77359785)
for _,v in pairs(Prod) do print(_) end
print("[[===========================]]") print("Creator: "..Prod.Creator.Name.." || Published: "..Prod.Created) print("Price: "..Prod.PriceInRobux.."R$ || "..Prod.PriceInTickets.." Tix") print("Description: "..Prod.Description)
---
The above will print all of the keys of the 'key value pair'. You can then use it how you wish. I, for example, have printed the creator, publish time, price and description of an item. |
|
|
| Report Abuse |
|
|
Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
|
| 30 Jun 2013 10:38 AM |
| How do you use the "Prod.Creator.Name"? in pairs is something I haven't touched with scripting. I thought GetProductInfo just returns a table? |
|
|
| Report Abuse |
|
|
Desperian
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 3371 |
|
|
| 30 Jun 2013 10:41 AM |
Yes, it does return a table. The table is dictionary, so it has key value pairs.
For example, local Product = { ["Foo"] = "Hmph"; ["Bar"] = "Bleh"; }
Prod is a variable I've created further up the script. I'm using a loop to iterate through the table, to find out all of the keys I can use. All of these are present, whenevr you use the ':GetProductInfo()' method. Just trying to show you all of the 'things' you can utilise.
If that makes sense... |
|
|
| Report Abuse |
|
|
Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
|
| 30 Jun 2013 10:43 AM |
| Yeah, I know that Prod was the table value but I didn't know that it returned a dictionary. Thanks, I get it now :p |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 10:45 AM |
| Does GetProductInfo return its asset type ie. Place / Decal / Clothing / Gear ? |
|
|
| Report Abuse |
|
|
|
| 30 Jun 2013 10:46 AM |
| as part of the dictionary ofcourse |
|
|
| Report Abuse |
|
|
Nikilis
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 949 |
|
|
| 30 Jun 2013 10:47 AM |
| It returns AssetTypeId. For example, hats are 8. |
|
|
| Report Abuse |
|
|
| |
|