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 » Scripting Helpers
Home Search
 

Re: Is DataCost property locked?

Previous Thread :: Next Thread 
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
18 May 2011 02:58 PM
I've only used it with the command bar, which worked fine, but sent an error when I tried to use just a regular script. Is it locked, or did I just do something stupid?
Report Abuse
61352151511 is not online. 61352151511
Joined: 30 Nov 2009
Total Posts: 8094
18 May 2011 02:58 PM
What is DataCost? I'm pretty sure it is Locked right now
Report Abuse
scripterzack is not online. scripterzack
Joined: 22 Jan 2011
Total Posts: 562
18 May 2011 02:59 PM
its roblox. dont worry.
Report Abuse
scripterzack is not online. scripterzack
Joined: 22 Jan 2011
Total Posts: 562
18 May 2011 03:00 PM
Data cost returns a number that says if you were to save that object, how much space it would take up.
Report Abuse
Piedude777 is not online. Piedude777
Joined: 01 Oct 2008
Total Posts: 10017
18 May 2011 03:07 PM
What, like player.DataCost?
Report Abuse
Piedude777 is not online. Piedude777
Joined: 01 Oct 2008
Total Posts: 10017
18 May 2011 03:08 PM
It's a read-only property, if that helps.
Report Abuse
61352151511 is not online. 61352151511
Joined: 30 Nov 2009
Total Posts: 8094
18 May 2011 03:09 PM
Piedude, It is a number for a Instance like saving a part takes 20 bytes

OT: When are you adding SaveData back to EpicMining?
Report Abuse
Piedude777 is not online. Piedude777
Joined: 01 Oct 2008
Total Posts: 10017
18 May 2011 03:15 PM
I know what DataCost is. -_-

And I'll add saving back when I finish it. There is a whole load of stuff and code and more stuff that needs to be done.
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
18 May 2011 03:18 PM
Yes, it's locked.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
18 May 2011 03:18 PM
Yeah, I know it's read-only. I tried something like this:

local n = 0
n = (n+OBJECT.DataCost)
Report Abuse
Piedude777 is not online. Piedude777
Joined: 01 Oct 2008
Total Posts: 10017
18 May 2011 03:19 PM
It's locked? Why? Do they actually have a reason for it?
Report Abuse
Illusion19 is not online. Illusion19
Joined: 21 Jul 2008
Total Posts: 10377
18 May 2011 03:19 PM
Crazyman, I sent you a pm with something that might help.. Well I havent sent one but im about to..
Report Abuse
BCGames is not online. BCGames
Joined: 30 Dec 2010
Total Posts: 8182
18 May 2011 03:20 PM
tonumber(n.DataCost)
._.
Report Abuse
61352151511 is not online. 61352151511
Joined: 30 Nov 2009
Total Posts: 8094
18 May 2011 03:20 PM
http://www.roblox.com/DataCost-item?id=52064373

Well its not quite locked. I got this to work.

_G.DataCost("InstanceName") -- Returns the DataCost of the Instance
_G.SpecificDataCost(string) -- Returns the DataCost of the string
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
18 May 2011 03:24 PM
@Pie,

I'm not sure why they locked it, but it's locked nevertheless.
Report Abuse
Robert00001 is not online. Robert00001
Joined: 15 May 2010
Total Posts: 7965
18 May 2011 03:29 PM
@613, I tried _G.DataCost("ForceField") but it said 'Unknown exception'
Report Abuse
Robert00001 is not online. Robert00001
Joined: 15 May 2010
Total Posts: 7965
18 May 2011 03:31 PM
@613,
_G.SpecificDataCost("Pie") > nil
Report Abuse
61352151511 is not online. 61352151511
Joined: 30 Nov 2009
Total Posts: 8094
18 May 2011 03:31 PM
don't add quotes for the Specific one. I'm not sure are you on Edit or Build? It worked on Build for me.
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
18 May 2011 03:33 PM
It is locked and reserved for security levels of 4 or higher. That includes being able to read it.
Report Abuse
Robert00001 is not online. Robert00001
Joined: 15 May 2010
Total Posts: 7965
18 May 2011 03:33 PM
Play Solo, which is like Build mode.
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
18 May 2011 03:34 PM
What you did does not unlock the function. It's erroring for him because the function is still locked.
Report Abuse
61352151511 is not online. 61352151511
Joined: 30 Nov 2009
Total Posts: 8094
18 May 2011 03:35 PM
Well did you insert my script?

Here is what i did

_G.DataCost(type)
local p = Instance.new(type)
p.Parent = game.Workspace
print(p.DataCost)
p:Remove()
end

_G.SpecificDataCost(string)
print(string.DataCost)
end

enter these to command

_G.DataCost("IntValue")
_G.SpecificDataCost(game)
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
18 May 2011 03:36 PM
It isn't locked in the command bar, like we said, you idiot.
Report Abuse
61352151511 is not online. 61352151511
Joined: 30 Nov 2009
Total Posts: 8094
18 May 2011 03:37 PM
I never said it was locked. I just made a script and someone said it didnt work
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
18 May 2011 03:38 PM
@613 - My goal was to periodically check the amount of data circulating throughout the game based on all the objects' DataCost thing. And as MrNicNac stated, security level of a script is too low to do so.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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