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: Wat type of id is this?

Previous Thread :: Next Thread 
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:16 PM
:GetFreeModels("free",1) printed this:
free
171008961
396754882
hariz41

wat is the 396blablabla id?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
08 Jan 2015 08:17 PM
asset ID
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:17 PM
@chief
no because it brings u to catalog and it acts like it doesnt exist
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Jan 2015 08:17 PM
AssetIDs
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:18 PM
I know the first one is an assetid but the second one is not
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Jan 2015 08:18 PM
http://www.roblox.com/free-item?id=171008961

:)
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
08 Jan 2015 08:18 PM
can someone explain to me where "GetFreeModels" is from
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:19 PM
@cnt
I know that but the second one doesnt show up
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Jan 2015 08:20 PM
So much ninja going on.

What is the exact script you are using to display it?
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:20 PM
@cheif
Its a method for insertservice
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:21 PM
@cnt
I made this for my personal testing
t = game:GetService("InsertService"):GetFreeModels("Abcd",1)
print(t)
for i,v in pairs(unpack(t)) do
if type(v) == "table" then
for n,a in pairs(unpack(v)) do
print(tostring(a))
end
end
end
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
08 Jan 2015 08:21 PM
ah

strange there is "no documentation found" on the wiki.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Jan 2015 08:26 PM
You're using unpack wrong. Regardless, it's the 'AssetVersionId'
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:29 PM
@cnt
if I am using unpack wrong how come I get no errors and correct dump?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Jan 2015 08:31 PM
Even if it works, you don't even need unpack in that situation, since pairs takes a table for an argument. So you are just wasting resources. Every programmer with OCPD (And many without) are overly concerned about resources, so don't use unpack there.
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:31 PM
@cnt
I am using unpack correctly in this situation and u mean assetidversion right?
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:32 PM
@jarod
try it without unpacking I dare u
all u get is
22
21
table: 17E515F0
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Jan 2015 08:33 PM
That doesn't change it.
You're using it where you shouldn't be.
So check if the value is a table, and if so, iterate through it with next or pairs.
You don't need unpack.
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:34 PM
@jarod
can u read the whole post before u comment?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Jan 2015 08:35 PM
Because the second time you use unpack, the first table is returned meaning you are only getting the first found.
And the first time, it's ignoring the second table.
Report Abuse
EverythingScripted is not online. EverythingScripted
Joined: 13 May 2014
Total Posts: 4378
08 Jan 2015 08:36 PM
@cnt
I know that, this script was made before I didnt know there was any more tables, I wanted to make sure that if there was another table, it would unpack that too
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Jan 2015 08:37 PM
Pairs only cares about the first argument, you might as well just do
for i, v in pairs(t[1]) do
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Jan 2015 08:38 PM
Sorry I meant second, third, etc. arguments for the second loop.
And you can do [1] for the second instead of unpack since unpack is virtually useless here as it wastes memory.
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
08 Jan 2015 08:44 PM
To see the structure of the data, use HttpService:JSONEncode():

local query = "car"
local page = 1
local results = game:GetService("InsertService"):GetFreeModels(query, page)
print(game:GetService("HttpService"):JSONEncode(results))

[{
  "Results": [{
    "CreatorName": "pimster55",
    "AssetVersionId": "109557323",
    "AssetId": "46010614",
    "Name": "Car "
  }, {
    "CreatorName": "wether",
    "AssetVersionId": "110595688",
    "AssetId": "46463344",
    "Name": "Cars"
  }, {
    "CreatorName": "ijk",
    "AssetVersionId": "3156794",
    "AssetId": "2344676",
    "Name": "car"
  }, {
    "CreatorName": "iMakeModelsForFree",
    "AssetVersionId": "36822226",
    "AssetId": "14351370",
    "Name": "Car"
  }, {
    "CreatorName": "jacob40",
    "AssetVersionId": "36446167",
    "AssetId": "14204786",
    "Name": "Car"
  }, {
    "CreatorName": "doritos409",
    "AssetVersionId": "38164849",
    "AssetId": "14913729",
    "Name": "CAR"
  }, {
    "CreatorName": "Bubbafisher",
    "AssetVersionId": "32779511",
    "AssetId": "12811009",
    "Name": "Car"
  }, {
    "CreatorName": "desteny84",
    "AssetVersionId": "35340355",
    "AssetId": "12929496",
    "Name": "car"
  }, {
    "CreatorName": "al648spropdesigner",
    "AssetVersionId": "32678016",
    "AssetId": "12771479",
    "Name": "Car"
  }, {
    "CreatorName": "Zombie1212123",
    "AssetVersionId": "34999064",
    "AssetId": "13642790",
    "Name": "car"
  }, {
    "CreatorName": "Randyhelmet",
    "AssetVersionId": "35417080",
    "AssetId": "13802783",
    "Name": "Car"
  }, {
    "CreatorName": "DB1",
    "AssetVersionId": "35959031",
    "AssetId": "14017403",
    "Name": "Car"
  }, {
    "CreatorName": "keemobobo",
    "AssetVersionId": "37287705",
    "AssetId": "14551956",
    "Name": "car"
  }, {
    "CreatorName": "cartman131lost",
    "AssetVersionId": "37276773",
    "AssetId": "14547289",
    "Name": "Car"
  }, {
    "CreatorName": "book429",
    "AssetVersionId": "39358907",
    "AssetId": "15402361",
    "Name": "car"
  }, {
    "CreatorName": "roll643",
    "AssetVersionId": "39683759",
    "AssetId": "15534727",
    "Name": "Car"
  }, {
    "CreatorName": "roblox1226",
    "AssetVersionId": "40559972",
    "AssetId": "15898344",
    "Name": "car"
  }, {
    "CreatorName": "Th3Distrupt3r",
    "AssetVersionId": "66760857",
    "AssetId": "26869142",
    "Name": "car"
  }, {
    "CreatorName": "BOBROB1010",
    "AssetVersionId": "65893094",
    "AssetId": "26508175",
    "Name": "CAR"
  }, {
    "CreatorName": "fubble12345",
    "AssetVersionId": "69143881",
    "AssetId": "27863185",
    "Name": "car"
  }, {
    "CreatorName": "fartandshart",
    "AssetVersionId": "81247788",
    "AssetId": "32815092",
    "Name": "Car"
  }],
  "TotalCount": "21",
  "CurrentStartIndex": "22"
}]
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Jan 2015 08:47 PM
And that day, numerous model makers were joyed to have Seranok mention them in a discussion.
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