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: what is the purpose of "do --code end" in long scripts

Previous Thread :: Next Thread 
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
08 Oct 2016 01:37 AM
in a lot of long scripts i find:

do
--code
end

does this have any purpose


Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Oct 2016 01:39 AM
Mainly it's for organizational purposes, but it can also allow the reuse of local variables (but typically this is not the reason why people usually use it).
Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
08 Oct 2016 01:43 AM
i found one part of code where the coder did this:

do
do
do
--code
end
end
end

no idea why


Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
08 Oct 2016 01:43 AM
That's probably just a troll doing that
Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
08 Oct 2016 01:44 AM
i'm looking at scripts from a stolen game to learn things, i don't think it's a troll


Report Abuse
JoshRBX is not online. JoshRBX
Joined: 19 May 2012
Total Posts: 8778
08 Oct 2016 02:01 AM
i don't think you'll ever need to use that
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Oct 2016 02:16 AM
Their just a bad scripter.
Report Abuse
SadisticNub is not online. SadisticNub
Joined: 05 Jan 2013
Total Posts: 4948
08 Oct 2016 02:25 AM
"i don't think you'll ever need to use that"
i don't think you should be alive

"Their just a bad scripter."
you are just a bad scripter
Report Abuse
Kervos is not online. Kervos
Joined: 27 Aug 2015
Total Posts: 322
08 Oct 2016 02:29 AM
someone is feeling edgy today

Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
08 Oct 2016 02:50 AM
I guess mr nub thinks:

do
do
do
--code
end
end
end


Is good to do... xD
Maybe that's why his name contains nub. x)
Report Abuse
xThe_Developer is not online. xThe_Developer
Joined: 07 Aug 2013
Total Posts: 585
08 Oct 2016 03:14 AM
"do --code end"

Is used in most cases in this sense to make it appear cleaner/ easier to navigate once the script gets too large to get managed and you have to use collapse all folds to get around. That is what most older scripts provide insight to/on.


#code Signature_mod = require(DataModel['sm_Data']) if Signature_mod['xThe..']['RbxDev_Info'] ~= 'Too Lazy To Try Again After A Year' then print('You finally did it lol') end
Report Abuse
xThe_Developer is not online. xThe_Developer
Joined: 07 Aug 2013
Total Posts: 585
08 Oct 2016 03:16 AM
Basically what cnt said.


#code Signature_mod = require(DataModel['sm_Data']) if Signature_mod['xThe..']['RbxDev_Info'] ~= 'Too Lazy To Try Again After A Year' then print('You finally did it lol') end
Report Abuse
SadisticNub is not online. SadisticNub
Joined: 05 Jan 2013
Total Posts: 4948
08 Oct 2016 03:47 AM
i guess devvince thinks he knows lua
Report Abuse
DarthStrantax is not online. DarthStrantax
Joined: 31 May 2011
Total Posts: 2610
08 Oct 2016 04:26 AM
Its for reusing local statements like cnt said
--code
local x=3
local y=2
do
local x = 1
print(x+y)
end
print(x+y)
--code
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
08 Oct 2016 04:32 AM
I haven't been here for a while... Sadistic is apparently the new troll that tries to confused newbies? It's about time, we'd been without one for nearly a week.


Report Abuse
SadisticNub is not online. SadisticNub
Joined: 05 Jan 2013
Total Posts: 4948
08 Oct 2016 05:17 AM
that's your job, hoss
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