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
 

What is this for?

Previous Thread :: Next Thread 
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
20 Jun 2014 04:57 PM
do function()

?

Is this like do-while but not a loop, running the function once?

I don't get what the "do" is for.
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
20 Jun 2014 05:00 PM
Erm...

never heard of it. But it'll probably error because of incorrect Syntax.
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
20 Jun 2014 05:01 PM
No, it's correct syntax- nobody in SH has been able to explain though.
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
20 Jun 2014 05:03 PM
I think it's just something that's completely unnecessary and could probably be written easier and more simpler.
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
20 Jun 2014 05:10 PM
"I think it's just something that's completely unnecessary and could probably be written easier and more simpler."

It was written by Devoi, an advanced scripter- so I put effort into trying to think of what he's writing. He forums in Scripters and writes more efficent code than almost any other clan's source I've seen.

So I'm gonna try to figure it out.
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
20 Jun 2014 05:12 PM
Notice I said 'I think'.

Not 'I know'.

I don't really rely on clan coders to look for efficiency. I mainly go to my GMod friends for help whenever I need it.
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
20 Jun 2014 05:13 PM
What's GMod's version of Lua called?
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
20 Jun 2014 05:18 PM
I think they just use standard Lua 5.3, but I'll go ask them.
Report Abuse
SuperiorEternal is not online. SuperiorEternal
Joined: 22 Aug 2009
Total Posts: 2365
20 Jun 2014 05:58 PM
That is just the name of the function...?
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
20 Jun 2014 07:05 PM
no it isn't

you define a function like function swag()
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
20 Jun 2014 07:20 PM
"function()" defines a function, it just dosen't assign it to any variable. "function swag()" defines the variabel swag as the function, same as "swag=function()"
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
20 Jun 2014 07:21 PM
Oh an a do statement and a function both need an end, so it should at least be like this:
"do function() end end"
Report Abuse
zub74 is not online. zub74
Joined: 13 Sep 2008
Total Posts: 489
20 Jun 2014 07:24 PM
Perhaps
do function()
until stuff
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
20 Jun 2014 07:25 PM
ROBLOX Filters say there is something wrong with this post, but I just went ahead and posted it on pastebin. It explains what 'do' is used.

http://pastebin.com/JBFGDz6S
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
20 Jun 2014 07:26 PM
What's the point of having a function then rather than just writing code?

Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
20 Jun 2014 07:26 PM
OH AND I FORGOT SOMETHING
This is the absolute minimum syntactically correct form:

"do (function() end)() end"
Report Abuse
Lazulite is not online. Lazulite
Joined: 09 Jun 2014
Total Posts: 1217
20 Jun 2014 07:30 PM
ty thenew
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