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 » Roblox » Suggestions & Ideas
Home Search
 

Add exit() function to scripts

Previous Thread :: Next Thread 
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
19 Jan 2017 08:57 PM
The problem with error is that it posts an error message. In scripts, you can do do return end to exit, but scripts are a bunch of functions that render this useless.

Just strip the error message off error() and you got yourself an exit.
Report Abuse
MyPWisRule22 is not online. MyPWisRule22
Joined: 27 Dec 2015
Total Posts: 3194
19 Jan 2017 09:04 PM
ok
Report Abuse
mypasswrdiswaazup11 is not online. mypasswrdiswaazup11
Joined: 24 Jun 2012
Total Posts: 638
19 Jan 2017 09:17 PM
lol no
Report Abuse
PhantomVisual is not online. PhantomVisual
Joined: 08 Apr 2011
Total Posts: 2025
19 Jan 2017 09:21 PM
Just stick with return end. If you need to run two loops at once, use the Spawn() function or some other method.

function loop1()
while true do
wait(1)
print"loop1 is running"
end
end

Spawn(loop1)

while true do
wait(1)
print"loop2 is running"
end

Output:
loop1 is running
loop2 is running
loop1 is running
loop2 is running
loop1 is running
loop2 is running
loop1 is running
loop2 is running

and whatnot.


Report Abuse
MyPWisRule22 is not online. MyPWisRule22
Joined: 27 Dec 2015
Total Posts: 3194
19 Jan 2017 09:26 PM
would cause lag
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
19 Jan 2017 11:44 PM
Misunderstood I guess,

exit() is for completely stopping a script. Having to return safely from the script requires way more work than just stopping execution.
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
21 Jan 2017 09:56 PM
bump
Report Abuse
dardo99 is not online. dardo99
Joined: 11 May 2013
Total Posts: 525
21 Jan 2017 10:20 PM
you can already stop a script with script.Active = false


Im equiped with https://www.roblox.com/library/305170648/ODer-Repellent
Report Abuse
PhantomVisual is not online. PhantomVisual
Joined: 08 Apr 2011
Total Posts: 2025
21 Jan 2017 10:31 PM
or script.Disabled = true


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » Suggestions & Ideas
   
 
   
  • 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